diff options
author | Torok Edwin <edwintorok@gmail.com> | 2009-09-02 11:13:56 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2009-09-02 11:13:56 +0000 |
commit | 18e03dd70ca6a0c79c19ad49134440caf4ca7c69 (patch) | |
tree | 28c211d29a5200ef5652f2add91344c5c48c9ffd /llvm/lib/Analysis | |
parent | 68c5f477fa30a6b2fa7687536dd3795cf85d0de4 (diff) | |
download | bcm5719-llvm-18e03dd70ca6a0c79c19ad49134440caf4ca7c69.tar.gz bcm5719-llvm-18e03dd70ca6a0c79c19ad49134440caf4ca7c69.zip |
Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification in
r80406, and readd a -print-dbginfo test.
llvm-svn: 80778
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index cb2d624a909..aa71f1dc678 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -1058,6 +1058,11 @@ bool llvm::GetConstantStringInfo(Value *V, std::string &Str, uint64_t Offset, StopAtNul); } + if (MDString *MDStr = dyn_cast<MDString>(V)) { + Str = MDStr->getString(); + return true; + } + // The GEP instruction, constant or instruction, must reference a global // variable that is a constant and is initialized. The referenced constant // initializer is the array that we'll use for optimization. |