summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/IntrinsicInst.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-06-29 17:57:03 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-06-29 17:57:03 +0000
commita7c583d584d0c305cd65be912cdf157b07b56fa2 (patch)
tree91a6ba5348f313e072f623304c404cacc108f03a /llvm/lib/VMCore/IntrinsicInst.cpp
parenta7e619c17b62dc9ddfadaa79017b96f895598ada (diff)
downloadbcm5719-llvm-a7c583d584d0c305cd65be912cdf157b07b56fa2.tar.gz
bcm5719-llvm-a7c583d584d0c305cd65be912cdf157b07b56fa2.zip
Revert (52748 and friends):
Move GetConstantStringInfo to lib/Analysis. Remove string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. This unbreaks llvm-gcc bootstrap. llvm-svn: 52884
Diffstat (limited to 'llvm/lib/VMCore/IntrinsicInst.cpp')
-rw-r--r--llvm/lib/VMCore/IntrinsicInst.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/VMCore/IntrinsicInst.cpp b/llvm/lib/VMCore/IntrinsicInst.cpp
index 6bd9431767e..eca606292dc 100644
--- a/llvm/lib/VMCore/IntrinsicInst.cpp
+++ b/llvm/lib/VMCore/IntrinsicInst.cpp
@@ -28,7 +28,6 @@
#include "llvm/IntrinsicInst.h"
#include "llvm/Constants.h"
#include "llvm/GlobalVariable.h"
-#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/MachineDebugInfoDesc.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
using namespace llvm;
@@ -59,20 +58,20 @@ Value *DbgInfoIntrinsic::StripCast(Value *C) {
/// DbgStopPointInst - This represents the llvm.dbg.stoppoint instruction.
///
-Value *DbgStopPointInst::getFileName() const {
+std::string DbgStopPointInst::getFileName() const {
// Once the operand indices are verified, update this assert
assert(LLVMDebugVersion == (6 << 16) && "Verify operand indices");
GlobalVariable *GV = cast<GlobalVariable>(getContext());
- if (!GV->hasInitializer()) return NULL;
+ if (!GV->hasInitializer()) return "";
ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer());
- return CS->getOperand(4);
+ return CS->getOperand(3)->getStringValue();
}
-Value *DbgStopPointInst::getDirectory() const {
+std::string DbgStopPointInst::getDirectory() const {
// Once the operand indices are verified, update this assert
assert(LLVMDebugVersion == (6 << 16) && "Verify operand indices");
GlobalVariable *GV = cast<GlobalVariable>(getContext());
- if (!GV->hasInitializer()) return NULL;
+ if (!GV->hasInitializer()) return "";
ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer());
- return CS->getOperand(4);
+ return CS->getOperand(4)->getStringValue();
}
OpenPOWER on IntegriCloud