diff options
author | Devang Patel <dpatel@apple.com> | 2009-07-22 17:43:22 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-07-22 17:43:22 +0000 |
commit | 0c0a6cad49b088d937ea0043030deda499145b30 (patch) | |
tree | c76031cf9bdfac5f7ac7f46d5360b7d8675c12c0 /lib/VMCore/Value.cpp | |
parent | 3fb536bde6f584edf5202eb96ccdd69442882b95 (diff) | |
download | external_llvm-0c0a6cad49b088d937ea0043030deda499145b30.zip external_llvm-0c0a6cad49b088d937ea0043030deda499145b30.tar.gz external_llvm-0c0a6cad49b088d937ea0043030deda499145b30.tar.bz2 |
Introduce MetadataBase, a base class for MDString and MDNode.
Derive MDString directly from MetadataBase.
Introduce new bitcode block to hold metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Value.cpp')
-rw-r--r-- | lib/VMCore/Value.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index 07fbfc6..b3c0692 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -18,6 +18,7 @@ #include "llvm/Instructions.h" #include "llvm/Operator.h" #include "llvm/Module.h" +#include "llvm/MDNode.h" #include "llvm/ValueSymbolTable.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -140,7 +141,9 @@ static bool getSymTab(Value *V, ValueSymbolTable *&ST) { } else if (Argument *A = dyn_cast<Argument>(V)) { if (Function *P = A->getParent()) ST = &P->getValueSymbolTable(); - } else { + } else if (isa<MDString>(V)) + return true; + else { assert(isa<Constant>(V) && "Unknown value type!"); return true; // no name is setable for this. } |