aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Value.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-22 17:43:22 +0000
committerDevang Patel <dpatel@apple.com>2009-07-22 17:43:22 +0000
commit0c0a6cad49b088d937ea0043030deda499145b30 (patch)
treec76031cf9bdfac5f7ac7f46d5360b7d8675c12c0 /lib/VMCore/Value.cpp
parent3fb536bde6f584edf5202eb96ccdd69442882b95 (diff)
downloadexternal_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.cpp5
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.
}