aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-06 21:00:37 +0000
committerChris Lattner <sabre@nondot.org>2007-08-06 21:00:37 +0000
commit6df20efcc33aa4f730f4d6406e11b9fe1efd377e (patch)
tree84af46add93ff837105886a82a3dc4686e92eb44 /lib/AsmParser
parenta583990ec83a4773608084a9694943ddd268e571 (diff)
downloadexternal_llvm-6df20efcc33aa4f730f4d6406e11b9fe1efd377e.zip
external_llvm-6df20efcc33aa4f730f4d6406e11b9fe1efd377e.tar.gz
external_llvm-6df20efcc33aa4f730f4d6406e11b9fe1efd377e.tar.bz2
Fix PR1577, a crash on invalid bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/llvmAsmParser.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index 9d7b063..adf6ead 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -1980,6 +1980,7 @@ ThreadLocal : THREAD_LOCAL { $$ = true; } | { $$ = false; };
AliaseeRef : ResultTypes SymbolicValueRef {
const Type* VTy = $1->get();
Value *V = getVal(VTy, $2);
+ CHECK_FOR_ERROR
GlobalValue* Aliasee = dyn_cast<GlobalValue>(V);
if (!Aliasee)
GEN_ERROR("Aliases can be created only to global values");