[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y

LLVM llvm at cs.uiuc.edu
Sun Jul 4 07:20:01 PDT 2004


Changes in directory llvm/lib/AsmParser:

llvmAsmParser.y updated: 1.169 -> 1.170

---
Log message:

- remove use of isa<Type>(Val) since there's no inheritance relationship
  any more. Needed for bug 122: http://llvm.cs.uiuc.edu/PR122 
- #include <iostream> since Value.h doesn't include it any more.


---
Diffs of the changes:  (+3 -4)

Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.169 llvm/lib/AsmParser/llvmAsmParser.y:1.170
--- llvm/lib/AsmParser/llvmAsmParser.y:1.169	Thu Jun 17 13:18:08 2004
+++ llvm/lib/AsmParser/llvmAsmParser.y	Sun Jul  4 07:19:05 2004
@@ -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 @@
   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 @@
     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 @@
 // 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





More information about the llvm-commits mailing list