aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Analysis/ValueTracking.h11
-rw-r--r--include/llvm/Constant.h7
-rw-r--r--include/llvm/IntrinsicInst.h4
3 files changed, 10 insertions, 12 deletions
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h
index 1003269e28..80d598dffe 100644
--- a/include/llvm/Analysis/ValueTracking.h
+++ b/include/llvm/Analysis/ValueTracking.h
@@ -72,16 +72,7 @@ namespace llvm {
Instruction *InsertBefore = 0) {
const unsigned Idxs[1] = { Idx };
return FindInsertedValue(V, &Idxs[0], &Idxs[1], InsertBefore);
- }
-
- /// GetConstantStringInfo - This function computes the length of a
- /// null-terminated C string pointed to by V. If successful, it returns true
- /// and returns the string in Str. If unsuccessful, it returns false. If
- /// StopAtNul is set to true (the default), the returned string is truncated
- /// by a nul character in the global. If StopAtNul is false, the nul
- /// character is included in the result string.
- bool GetConstantStringInfo(Value *V, std::string &Str, uint64_t Offset = 0,
- bool StopAtNul = true);
+ }
} // end namespace llvm
#endif
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h
index c45ec2e77e..d85771a09a 100644
--- a/include/llvm/Constant.h
+++ b/include/llvm/Constant.h
@@ -115,6 +115,13 @@ public:
"implemented for all constants that have operands!");
assert(0 && "Constants that do not have operands cannot be using 'From'!");
}
+
+ /// getStringValue - Turn an LLVM constant pointer that eventually points to a
+ /// global into a string value. Return an empty string if we can't do it.
+ /// Parameter Chop determines if the result is chopped at the first null
+ /// terminator.
+ ///
+ std::string getStringValue(bool Chop = true, unsigned Offset = 0);
};
} // End llvm namespace
diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h
index 16a43d4197..c674e47b3a 100644
--- a/include/llvm/IntrinsicInst.h
+++ b/include/llvm/IntrinsicInst.h
@@ -96,8 +96,8 @@ namespace llvm {
return unsigned(cast<ConstantInt>(getOperand(2))->getZExtValue());
}
- Value* getFileName() const;
- Value* getDirectory() const;
+ std::string getFileName() const;
+ std::string getDirectory() const;
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const DbgStopPointInst *) { return true; }