aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorJoe Abbey <jabbey@arxan.com>2013-02-06 22:14:06 +0000
committerJoe Abbey <jabbey@arxan.com>2013-02-06 22:14:06 +0000
commitacb6194f93440425776cdd730a2726fd95499505 (patch)
treecd75066c317f5ca155a58e89f8879e8739254fde /lib/Bitcode/Reader/BitcodeReader.cpp
parent01776a5a9480243f95fff50c96e3f35fad41e4cb (diff)
downloadexternal_llvm-acb6194f93440425776cdd730a2726fd95499505.zip
external_llvm-acb6194f93440425776cdd730a2726fd95499505.tar.gz
external_llvm-acb6194f93440425776cdd730a2726fd95499505.tar.bz2
Code Custodian (trivial whitespace cleanup)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index e10e6d6..2c1e535 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -462,7 +462,7 @@ bool BitcodeReader::ParseAttributeBlock() {
// Read all the records.
while (1) {
BitstreamEntry Entry = Stream.advanceSkippingSubblocks();
-
+
switch (Entry.Kind) {
case BitstreamEntry::SubBlock: // Handled for us already.
case BitstreamEntry::Error:
@@ -473,7 +473,7 @@ bool BitcodeReader::ParseAttributeBlock() {
// The interesting case.
break;
}
-
+
// Read a record.
Record.clear();
switch (Stream.readRecord(Entry.ID, Record)) {
@@ -517,7 +517,7 @@ bool BitcodeReader::ParseTypeTableBody() {
// Read all the records for this type table.
while (1) {
BitstreamEntry Entry = Stream.advanceSkippingSubblocks();
-
+
switch (Entry.Kind) {
case BitstreamEntry::SubBlock: // Handled for us already.
case BitstreamEntry::Error:
@@ -734,7 +734,7 @@ bool BitcodeReader::ParseValueSymbolTable() {
SmallString<128> ValueName;
while (1) {
BitstreamEntry Entry = Stream.advanceSkippingSubblocks();
-
+
switch (Entry.Kind) {
case BitstreamEntry::SubBlock: // Handled for us already.
case BitstreamEntry::Error:
@@ -789,7 +789,7 @@ bool BitcodeReader::ParseMetadata() {
// Read all the records.
while (1) {
BitstreamEntry Entry = Stream.advanceSkippingSubblocks();
-
+
switch (Entry.Kind) {
case BitstreamEntry::SubBlock: // Handled for us already.
case BitstreamEntry::Error:
@@ -944,7 +944,7 @@ bool BitcodeReader::ParseConstants() {
unsigned NextCstNo = ValueList.size();
while (1) {
BitstreamEntry Entry = Stream.advanceSkippingSubblocks();
-
+
switch (Entry.Kind) {
case BitstreamEntry::SubBlock: // Handled for us already.
case BitstreamEntry::Error:
@@ -952,7 +952,7 @@ bool BitcodeReader::ParseConstants() {
case BitstreamEntry::EndBlock:
if (NextCstNo != ValueList.size())
return Error("Invalid constant reference!");
-
+
// Once all the constants have been read, go through and resolve forward
// references.
ValueList.ResolveConstantForwardRefs();
@@ -1337,7 +1337,7 @@ bool BitcodeReader::ParseUseLists() {
// Read all the records.
while (1) {
BitstreamEntry Entry = Stream.advanceSkippingSubblocks();
-
+
switch (Entry.Kind) {
case BitstreamEntry::SubBlock: // Handled for us already.
case BitstreamEntry::Error:
@@ -1425,14 +1425,14 @@ bool BitcodeReader::ParseModule(bool Resume) {
// Read all the records for this module.
while (1) {
BitstreamEntry Entry = Stream.advance();
-
+
switch (Entry.Kind) {
case BitstreamEntry::Error:
Error("malformed module block");
return true;
case BitstreamEntry::EndBlock:
return GlobalCleanup();
-
+
case BitstreamEntry::SubBlock:
switch (Entry.ID) {
default: // Skip unknown content.
@@ -1473,7 +1473,7 @@ bool BitcodeReader::ParseModule(bool Resume) {
return true;
SeenFirstFunctionBody = true;
}
-
+
if (RememberAndSkipFunctionBody())
return true;
// For streaming bitcode, suspend parsing when we reach the function
@@ -1493,7 +1493,7 @@ bool BitcodeReader::ParseModule(bool Resume) {
break;
}
continue;
-
+
case BitstreamEntry::Record:
// The interesting case.
break;
@@ -1714,17 +1714,17 @@ bool BitcodeReader::ParseBitcodeInto(Module *M) {
while (1) {
if (Stream.AtEndOfStream())
return false;
-
+
BitstreamEntry Entry =
Stream.advance(BitstreamCursor::AF_DontAutoprocessAbbrevs);
-
+
switch (Entry.Kind) {
case BitstreamEntry::Error:
Error("malformed module file");
return true;
case BitstreamEntry::EndBlock:
return false;
-
+
case BitstreamEntry::SubBlock:
switch (Entry.ID) {
case bitc::BLOCKINFO_BLOCK_ID:
@@ -1748,7 +1748,7 @@ bool BitcodeReader::ParseBitcodeInto(Module *M) {
continue;
case BitstreamEntry::Record:
// There should be no records in the top-level of blocks.
-
+
// The ranlib in Xcode 4 will align archive members by appending newlines
// to the end of them. If this file size is a multiple of 4 but not 8, we
// have to read and ignore these final 4 bytes :-(
@@ -1756,7 +1756,7 @@ bool BitcodeReader::ParseBitcodeInto(Module *M) {
Stream.Read(6) == 2 && Stream.Read(24) == 0xa0a0a &&
Stream.AtEndOfStream())
return false;
-
+
return Error("Invalid record at top-level");
}
}
@@ -1771,7 +1771,7 @@ bool BitcodeReader::ParseModuleTriple(std::string &Triple) {
// Read all the records for this module.
while (1) {
BitstreamEntry Entry = Stream.advanceSkippingSubblocks();
-
+
switch (Entry.Kind) {
case BitstreamEntry::SubBlock: // Handled for us already.
case BitstreamEntry::Error:
@@ -1814,25 +1814,25 @@ bool BitcodeReader::ParseTriple(std::string &Triple) {
// need to understand them all.
while (1) {
BitstreamEntry Entry = Stream.advance();
-
+
switch (Entry.Kind) {
case BitstreamEntry::Error:
Error("malformed module file");
return true;
case BitstreamEntry::EndBlock:
return false;
-
+
case BitstreamEntry::SubBlock:
if (Entry.ID == bitc::MODULE_BLOCK_ID)
return ParseModuleTriple(Triple);
-
+
// Ignore other sub-blocks.
if (Stream.SkipBlock()) {
Error("malformed block record in AST file");
return true;
}
continue;
-
+
case BitstreamEntry::Record:
Stream.skipRecord(Entry.ID);
continue;
@@ -1848,7 +1848,7 @@ bool BitcodeReader::ParseMetadataAttachment() {
SmallVector<uint64_t, 64> Record;
while (1) {
BitstreamEntry Entry = Stream.advanceSkippingSubblocks();
-
+
switch (Entry.Kind) {
case BitstreamEntry::SubBlock: // Handled for us already.
case BitstreamEntry::Error:
@@ -1908,13 +1908,13 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
SmallVector<uint64_t, 64> Record;
while (1) {
BitstreamEntry Entry = Stream.advance();
-
+
switch (Entry.Kind) {
case BitstreamEntry::Error:
return Error("Bitcode error in function block");
case BitstreamEntry::EndBlock:
goto OutOfRecordLoop;
-
+
case BitstreamEntry::SubBlock:
switch (Entry.ID) {
default: // Skip unknown content.
@@ -1936,12 +1936,12 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
break;
}
continue;
-
+
case BitstreamEntry::Record:
// The interesting case.
break;
}
-
+
// Read a record.
Record.clear();
Instruction *I = 0;
@@ -2723,7 +2723,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
}
OutOfRecordLoop:
-
+
// Check the function list for unresolved values.
if (Argument *A = dyn_cast<Argument>(ValueList.back())) {
if (A->getParent() == 0) {