aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-04 12:19:05 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-04 12:19:05 +0000
commit8ce1da781ef6b5f927e07c51d71c738eeb4a8be3 (patch)
treee95845f5cd064cade9b877645f1af2e3b22fb8ed
parent77f4d868d778bb5183ced488b037f9ea58bc74eb (diff)
- remove use of isa<Type>(Val) since there's no inheritance relationship
any more. Needed for bug 122 - #include <iostream> since Value.h doesn't include it any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14621 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AsmParser/llvmAsmParser.y7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index 042680ba16..8c571f4d77 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -21,9 +21,10 @@
#include "llvm/iPHINode.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "Support/STLExtras.h"
+#include <algorithm>
+#include <iostream>
#include <list>
#include <utility>
-#include <algorithm>
int yyerror(const char *ErrorMsg); // Forward declarations to prevent "implicit
int yylex(); // declaration" of xxx warnings.
@@ -236,7 +237,7 @@ static const Type *getTypeVal(const ValID &D, bool DoNotImprovise = false) {
case ValID::NameVal: { // Is it a named definition?
std::string Name(D.Name);
SymbolTable *SymTab = 0;
- Value *N = 0;
+ Type *N = 0;
if (inFunctionScope()) {
SymTab = &CurFun.CurrentFunction->getSymbolTable();
N = SymTab->lookupType(Name);
@@ -426,7 +427,6 @@ static void ResolveDefinitions(std::map<unsigned,ValueList> &LateResolvers,
while (!List.empty()) {
Value *V = List.back();
List.pop_back();
- assert(!isa<Type>(V) && "Types should be in LateResolveTypes!");
ValID &DID = getValIDFromPlaceHolder(V);
Value *TheRealValue =
@@ -501,7 +501,6 @@ static void ResolveTypes(std::map<ValID, PATypeHolder> &LateResolveTypes) {
// for the typeplane, false is returned.
//
static bool setValueName(Value *V, char *NameStr) {
- assert(!isa<Type>(V) && "Can't set name of a Type with setValueName");
if (NameStr == 0) return false;
std::string Name(NameStr); // Copy string