[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ArchiveReader.cpp Reader.cpp ReaderWrappers.cpp

Reid Spencer reid at x10sys.com
Wed Sep 1 15:55:58 PDT 2004



Changes in directory llvm/lib/Bytecode/Reader:

ArchiveReader.cpp updated: 1.18 -> 1.19
Reader.cpp updated: 1.127 -> 1.128
ReaderWrappers.cpp updated: 1.28 -> 1.29
---
Log message:

Changes For Bug 352: http://llvm.cs.uiuc.edu/PR352 
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM 
public header files must be under include/llvm/.


---
Diffs of the changes:  (+14 -8)

Index: llvm/lib/Bytecode/Reader/ArchiveReader.cpp
diff -u llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.18 llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.19
--- llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.18	Sun Jul  4 06:01:27 2004
+++ llvm/lib/Bytecode/Reader/ArchiveReader.cpp	Wed Sep  1 17:55:35 2004
@@ -18,7 +18,7 @@
 
 #include "llvm/Bytecode/Reader.h"
 #include "llvm/Module.h"
-#include "Support/FileUtilities.h"
+#include "llvm/Support/FileUtilities.h"
 #include <cstdlib>
 #include <iostream>
 using namespace llvm;


Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.127 llvm/lib/Bytecode/Reader/Reader.cpp:1.128
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.127	Sat Aug 21 15:53:56 2004
+++ llvm/lib/Bytecode/Reader/Reader.cpp	Wed Sep  1 17:55:35 2004
@@ -24,7 +24,7 @@
 #include "llvm/SymbolTable.h"
 #include "llvm/Bytecode/Format.h"
 #include "llvm/Support/GetElementPtrTypeIterator.h"
-#include "Support/StringExtras.h"
+#include "llvm/ADT/StringExtras.h"
 #include <sstream>
 using namespace llvm;
 
@@ -428,14 +428,20 @@
 
   if (!Create) return 0;  // Do not create a placeholder?
 
+  // Did we already create a place holder?
   std::pair<unsigned,unsigned> KeyValue(type, oNum);
   ForwardReferenceMap::iterator I = ForwardReferences.lower_bound(KeyValue);
   if (I != ForwardReferences.end() && I->first == KeyValue)
     return I->second;   // We have already created this placeholder
 
-  Value *Val = new Argument(getType(type));
-  ForwardReferences.insert(I, std::make_pair(KeyValue, Val));
-  return Val;
+  // If the type exists (it should)
+  if (const Type* Ty = getType(type)) {
+    // Create the place holder
+    Value *Val = new Argument(Ty);
+    ForwardReferences.insert(I, std::make_pair(KeyValue, Val));
+    return Val;
+  }
+  throw "Can't create placeholder for value of type slot #" + utostr(type);
 }
 
 /// This is just like getValue, but when a compaction table is in use, it 


Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp
diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.28 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.29
--- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.28	Tue Aug 24 17:46:20 2004
+++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp	Wed Sep  1 17:55:35 2004
@@ -17,9 +17,9 @@
 #include "Reader.h"
 #include "llvm/Module.h"
 #include "llvm/Instructions.h"
-#include "Support/FileUtilities.h"
-#include "Support/StringExtras.h"
-#include "Config/unistd.h"
+#include "llvm/Support/FileUtilities.h"
+#include "llvm/ADT/StringExtras.h"
+#include "llvm/Config/unistd.h"
 #include <cerrno>
 using namespace llvm;
 






More information about the llvm-commits mailing list