aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-08-26 05:01:18 +0000
committerDevang Patel <dpatel@apple.com>2009-08-26 05:01:18 +0000
commit94060421ce73922e71c183fba0fda8bace7d0e2d (patch)
tree5a87b0b92a0c718d5f87d80b51cc4a6b9251eb63 /lib/VMCore
parent66d02907de42fa311fb2b512e820277bb1a61e7c (diff)
downloadexternal_llvm-94060421ce73922e71c183fba0fda8bace7d0e2d.tar.gz
external_llvm-94060421ce73922e71c183fba0fda8bace7d0e2d.tar.bz2
external_llvm-94060421ce73922e71c183fba0fda8bace7d0e2d.zip
Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/AutoUpgrade.cpp74
-rw-r--r--lib/VMCore/Metadata.cpp2
-rw-r--r--lib/VMCore/ValueTypes.cpp1
3 files changed, 3 insertions, 74 deletions
diff --git a/lib/VMCore/AutoUpgrade.cpp b/lib/VMCore/AutoUpgrade.cpp
index 3f23b8d993..e4c0d1afc4 100644
--- a/lib/VMCore/AutoUpgrade.cpp
+++ b/lib/VMCore/AutoUpgrade.cpp
@@ -16,7 +16,8 @@
#include "llvm/Function.h"
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
-#include "llvm/IntrinsicInst.h"
+#include "llvm/Instructions.h"
+#include "llvm/Intrinsics.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/ErrorHandling.h"
#include <cstring>
@@ -433,74 +434,3 @@ void llvm::UpgradeCallsToIntrinsic(Function* F) {
}
}
}
-
-/// This function checks debug info intrinsics. If an intrinsic is invalid
-/// then this function simply removes the intrinsic.
-void llvm::CheckDebugInfoIntrinsics(Module *M) {
-
-
- if (Function *FuncStart = M->getFunction("llvm.dbg.func.start")) {
- if (!FuncStart->use_empty()) {
- DbgFuncStartInst *DFSI = cast<DbgFuncStartInst>(FuncStart->use_back());
- if (!isa<MDNode>(DFSI->getOperand(1))) {
- while (!FuncStart->use_empty()) {
- CallInst *CI = cast<CallInst>(FuncStart->use_back());
- CI->eraseFromParent();
- }
- FuncStart->eraseFromParent();
- }
- }
- }
-
- if (Function *StopPoint = M->getFunction("llvm.dbg.stoppoint")) {
- if (!StopPoint->use_empty()) {
- DbgStopPointInst *DSPI = cast<DbgStopPointInst>(StopPoint->use_back());
- if (!isa<MDNode>(DSPI->getOperand(3))) {
- while (!StopPoint->use_empty()) {
- CallInst *CI = cast<CallInst>(StopPoint->use_back());
- CI->eraseFromParent();
- }
- StopPoint->eraseFromParent();
- }
- }
- }
-
- if (Function *RegionStart = M->getFunction("llvm.dbg.region.start")) {
- if (!RegionStart->use_empty()) {
- DbgRegionStartInst *DRSI = cast<DbgRegionStartInst>(RegionStart->use_back());
- if (!isa<MDNode>(DRSI->getOperand(1))) {
- while (!RegionStart->use_empty()) {
- CallInst *CI = cast<CallInst>(RegionStart->use_back());
- CI->eraseFromParent();
- }
- RegionStart->eraseFromParent();
- }
- }
- }
-
- if (Function *RegionEnd = M->getFunction("llvm.dbg.region.end")) {
- if (!RegionEnd->use_empty()) {
- DbgRegionEndInst *DREI = cast<DbgRegionEndInst>(RegionEnd->use_back());
- if (!isa<MDNode>(DREI->getOperand(1))) {
- while (!RegionEnd->use_empty()) {
- CallInst *CI = cast<CallInst>(RegionEnd->use_back());
- CI->eraseFromParent();
- }
- RegionEnd->eraseFromParent();
- }
- }
- }
-
- if (Function *Declare = M->getFunction("llvm.dbg.declare")) {
- if (!Declare->use_empty()) {
- DbgDeclareInst *DDI = cast<DbgDeclareInst>(Declare->use_back());
- if (!isa<MDNode>(DDI->getOperand(2))) {
- while (!Declare->use_empty()) {
- CallInst *CI = cast<CallInst>(Declare->use_back());
- CI->eraseFromParent();
- }
- Declare->eraseFromParent();
- }
- }
- }
-}
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp
index d0bda869c0..208e1bcedc 100644
--- a/lib/VMCore/Metadata.cpp
+++ b/lib/VMCore/Metadata.cpp
@@ -82,7 +82,7 @@ MDNode *MDNode::get(LLVMContext &Context, Value*const* Vals, unsigned NumVals) {
V.reserve(NumVals);
for (unsigned i = 0; i < NumVals; ++i)
V.push_back(Vals[i]);
-
+
return pImpl->MDNodes.getOrCreate(Type::getMetadataTy(Context), V);
}
diff --git a/lib/VMCore/ValueTypes.cpp b/lib/VMCore/ValueTypes.cpp
index 7f9a6cde2d..b10b3c1200 100644
--- a/lib/VMCore/ValueTypes.cpp
+++ b/lib/VMCore/ValueTypes.cpp
@@ -169,7 +169,6 @@ const Type *EVT::getTypeForEVT(LLVMContext &Context) const {
case MVT::v8f32: return VectorType::get(Type::getFloatTy(Context), 8);
case MVT::v2f64: return VectorType::get(Type::getDoubleTy(Context), 2);
case MVT::v4f64: return VectorType::get(Type::getDoubleTy(Context), 4);
- case MVT::Metadata: return Type::getMetadataTy(Context);
}
}