diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-09-01 22:55:40 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-09-01 22:55:40 +0000 |
commit | 7c16caa33600bc473532fc2730aad1f62738b3ef (patch) | |
tree | 55aef6dec49750079b647bafb7e8e2983db01e67 /llvm/lib/Bytecode | |
parent | fae8f6a4fbdcda9f16c3b8ad70c14b58830626df (diff) | |
download | bcm5719-llvm-7c16caa33600bc473532fc2730aad1f62738b3ef.tar.gz bcm5719-llvm-7c16caa33600bc473532fc2730aad1f62738b3ef.zip |
Changes For Bug 352
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/.
llvm-svn: 16137
Diffstat (limited to 'llvm/lib/Bytecode')
-rw-r--r-- | llvm/lib/Bytecode/Reader/ArchiveReader.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Bytecode/Reader/Reader.cpp | 14 | ||||
-rw-r--r-- | llvm/lib/Bytecode/Reader/ReaderWrappers.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Bytecode/Writer/SlotCalculator.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Bytecode/Writer/Writer.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Bytecode/Writer/WriterInternals.h | 2 |
6 files changed, 19 insertions, 13 deletions
diff --git a/llvm/lib/Bytecode/Reader/ArchiveReader.cpp b/llvm/lib/Bytecode/Reader/ArchiveReader.cpp index 1d8530fc785..50e11d6ab58 100644 --- a/llvm/lib/Bytecode/Reader/ArchiveReader.cpp +++ b/llvm/lib/Bytecode/Reader/ArchiveReader.cpp @@ -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; diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp index f0b39d45de9..39f238c9869 100644 --- a/llvm/lib/Bytecode/Reader/Reader.cpp +++ b/llvm/lib/Bytecode/Reader/Reader.cpp @@ -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 @@ Value * BytecodeReader::getValue(unsigned type, unsigned oNum, bool Create) { 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 diff --git a/llvm/lib/Bytecode/Reader/ReaderWrappers.cpp b/llvm/lib/Bytecode/Reader/ReaderWrappers.cpp index 2930a42c63d..383e53e9be4 100644 --- a/llvm/lib/Bytecode/Reader/ReaderWrappers.cpp +++ b/llvm/lib/Bytecode/Reader/ReaderWrappers.cpp @@ -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; diff --git a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp index 2656edd8a54..d4145dbcdca 100644 --- a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp +++ b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp @@ -23,8 +23,8 @@ #include "llvm/SymbolTable.h" #include "llvm/Type.h" #include "llvm/Analysis/ConstantsScanner.h" -#include "Support/PostOrderIterator.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/PostOrderIterator.h" +#include "llvm/ADT/STLExtras.h" #include <algorithm> #include <functional> diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index 7db21486034..60a48cc2654 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/lib/Bytecode/Writer/Writer.cpp @@ -25,8 +25,8 @@ #include "llvm/Module.h" #include "llvm/SymbolTable.h" #include "llvm/Support/GetElementPtrTypeIterator.h" -#include "Support/STLExtras.h" -#include "Support/Statistic.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/Statistic.h" #include <cstring> #include <algorithm> using namespace llvm; diff --git a/llvm/lib/Bytecode/Writer/WriterInternals.h b/llvm/lib/Bytecode/Writer/WriterInternals.h index e496da9ff8f..8b5f99e94d3 100644 --- a/llvm/lib/Bytecode/Writer/WriterInternals.h +++ b/llvm/lib/Bytecode/Writer/WriterInternals.h @@ -23,7 +23,7 @@ #include "llvm/Bytecode/Writer.h" #include "llvm/Bytecode/Format.h" #include "llvm/Instruction.h" -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include <string> #include <vector> |