aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit6d116bc7ced56a820d33b0dd35ee36af8a810eab (patch)
treeb9d056c655001ef42c66a3395d01233d2a499537 /lib/VMCore/IntrinsicInst.cpp
parent28a2b54580b28be10c536def7f49b5599adf3631 (diff)
downloadexternal_llvm-6d116bc7ced56a820d33b0dd35ee36af8a810eab.zip
external_llvm-6d116bc7ced56a820d33b0dd35ee36af8a810eab.tar.gz
external_llvm-6d116bc7ced56a820d33b0dd35ee36af8a810eab.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/IntrinsicInst.cpp')
-rw-r--r--lib/VMCore/IntrinsicInst.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/VMCore/IntrinsicInst.cpp b/lib/VMCore/IntrinsicInst.cpp
index 6bd9431..eca6062 100644
--- a/lib/VMCore/IntrinsicInst.cpp
+++ b/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();
}