aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2005-04-21 22:55:34 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2005-04-21 22:55:34 +0000
commitf976c856fcc5055f3fc7d9f070d72c2d027c1d9d (patch)
treef2c13bd9a96ee1245b89075c2f44cef20e82e307
parentd1c881a8d4da8b4d99c2a40512fbcca652ab445e (diff)
Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp8
-rw-r--r--lib/ExecutionEngine/JIT/Intercept.cpp10
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp14
-rw-r--r--lib/ExecutionEngine/JIT/JIT.h8
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp12
-rw-r--r--lib/ExecutionEngine/JIT/TargetSelect.cpp4
-rw-r--r--lib/Linker/LinkArchives.cpp30
-rw-r--r--lib/Linker/LinkItems.cpp18
-rw-r--r--lib/Linker/LinkModules.cpp36
-rw-r--r--lib/Linker/Linker.cpp28
-rw-r--r--lib/Support/Annotation.cpp10
-rw-r--r--lib/Support/CommandLine.cpp76
-rw-r--r--lib/Support/Compressor.cpp54
-rw-r--r--lib/Support/Debug.cpp4
-rw-r--r--lib/Support/FileUtilities.cpp12
-rw-r--r--lib/Support/IsInf.cpp6
-rw-r--r--lib/Support/IsNAN.cpp6
-rw-r--r--lib/Support/PluginLoader.cpp4
-rw-r--r--lib/Support/SlowOperationInformer.cpp6
-rw-r--r--lib/Support/Statistic.cpp8
-rw-r--r--lib/Support/StringExtras.cpp8
-rw-r--r--lib/Support/SystemUtils.cpp8
-rw-r--r--lib/Support/Timer.cpp14
-rw-r--r--lib/Support/ToolRunner.cpp36
-rw-r--r--lib/Support/bzip2/bzlib.h172
-rw-r--r--lib/Support/bzip2/bzlib_private.h32
-rw-r--r--lib/System/DynamicLibrary.cpp10
-rw-r--r--lib/System/MappedFile.cpp8
-rw-r--r--lib/System/Memory.cpp8
-rw-r--r--lib/System/Path.cpp12
-rw-r--r--lib/System/Process.cpp8
-rw-r--r--lib/System/Program.cpp8
-rw-r--r--lib/System/Signals.cpp6
-rw-r--r--lib/System/TimeValue.cpp6
-rw-r--r--lib/System/Unix/SUS/Process.cpp10
-rw-r--r--lib/System/Unix/Unix.h8
-rw-r--r--lib/System/Win32/Win32.h6
-rw-r--r--lib/Target/MRegisterInfo.cpp6
-rw-r--r--lib/Target/TargetData.cpp10
-rw-r--r--lib/Target/TargetFrameInfo.cpp12
-rw-r--r--lib/Target/TargetInstrInfo.cpp10
-rw-r--r--lib/Target/TargetMachine.cpp6
-rw-r--r--lib/Target/TargetMachineRegistry.cpp12
-rw-r--r--lib/Target/TargetSchedInfo.cpp52
-rw-r--r--tools/bugpoint/ToolRunner.cpp36
45 files changed, 429 insertions, 429 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 206a806574..7d720f149f 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1,10 +1,10 @@
//===-- TargetLowering.cpp - Implement the TargetLowering class -----------===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This implements the TargetLowering class.
@@ -76,7 +76,7 @@ void TargetLowering::computeRegisterProperties() {
// Everything defaults to one.
for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i)
NumElementsForVT[i] = 1;
-
+
// Find the largest integer register class.
unsigned LargestIntReg = MVT::i128;
for (; RegClassForVT[LargestIntReg] == 0; --LargestIntReg)
@@ -101,7 +101,7 @@ void TargetLowering::computeRegisterProperties() {
TransformToType, ValueTypeActions);
else
TransformToType[(MVT::ValueType)IntReg] = (MVT::ValueType)IntReg;
-
+
// If the target does not have native support for F32, promote it to F64.
if (!hasNativeSupportFor(MVT::f32))
SetValueTypeAction(MVT::f32, Promote, *this,
diff --git a/lib/ExecutionEngine/JIT/Intercept.cpp b/lib/ExecutionEngine/JIT/Intercept.cpp
index 3c30dbb179..f078e09867 100644
--- a/lib/ExecutionEngine/JIT/Intercept.cpp
+++ b/lib/ExecutionEngine/JIT/Intercept.cpp
@@ -1,10 +1,10 @@
//===-- Intercept.cpp - System function interception routines -------------===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// If a function call occurs to an external function, the JIT is designed to use
@@ -50,7 +50,7 @@ static void runAtExitHandlers() {
#if defined(__linux__)
#if defined(HAVE_SYS_STAT_H)
#include <sys/stat.h>
-#endif
+#endif
void *FunctionPointers[] = {
(void *) stat,
(void *) fstat,
@@ -84,9 +84,9 @@ static int jit_atexit(void (*Fn)(void)) {
}
//===----------------------------------------------------------------------===//
-//
+//
/// getPointerToNamedFunction - This method returns the address of the specified
-/// function by using the dynamic loader interface. As such it is only useful
+/// function by using the dynamic loader interface. As such it is only useful
/// for resolving library symbols, not code generated symbols.
///
void *JIT::getPointerToNamedFunction(const std::string &Name) {
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 1d781d6e4e..0559c53e6c 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -1,10 +1,10 @@
//===-- JIT.cpp - LLVM Just in Time Compiler ------------------------------===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This tool implements a just-in-time compiler for LLVM, allowing direct
@@ -35,7 +35,7 @@ JIT::JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji)
// Initialize MCE
MCE = createEmitter(*this);
-
+
// Add target data
PM.add(new TargetData(TM.getTargetData()));
@@ -77,7 +77,7 @@ GenericValue JIT::runFunction(Function *F,
if (RetTy == Type::IntTy || RetTy == Type::UIntTy || RetTy == Type::VoidTy) {
switch (ArgValues.size()) {
case 3:
- if ((FTy->getParamType(0) == Type::IntTy ||
+ if ((FTy->getParamType(0) == Type::IntTy ||
FTy->getParamType(0) == Type::UIntTy) &&
isa<PointerType>(FTy->getParamType(1)) &&
isa<PointerType>(FTy->getParamType(2))) {
@@ -92,7 +92,7 @@ GenericValue JIT::runFunction(Function *F,
}
break;
case 2:
- if ((FTy->getParamType(0) == Type::IntTy ||
+ if ((FTy->getParamType(0) == Type::IntTy ||
FTy->getParamType(0) == Type::UIntTy) &&
isa<PointerType>(FTy->getParamType(1))) {
int (*PF)(int, char **) = (int(*)(int, char **))FPtr;
@@ -105,7 +105,7 @@ GenericValue JIT::runFunction(Function *F,
break;
case 1:
if (FTy->getNumParams() == 1 &&
- (FTy->getParamType(0) == Type::IntTy ||
+ (FTy->getParamType(0) == Type::IntTy ||
FTy->getParamType(0) == Type::UIntTy)) {
GenericValue rv;
int (*PF)(int) = (int(*)(int))FPtr;
@@ -239,7 +239,7 @@ void *JIT::getPointerToFunction(Function *F) {
return Addr; // Check if function already code gen'd
// Make sure we read in the function if it exists in this Module
- if (F->hasNotBeenReadFromBytecode())
+ if (F->hasNotBeenReadFromBytecode())
try {
MP->materializeFunction(F);
} catch ( std::string& errmsg ) {
diff --git a/lib/ExecutionEngine/JIT/JIT.h b/lib/ExecutionEngine/JIT/JIT.h
index 59482369ba..3c14cf71db 100644
--- a/lib/ExecutionEngine/JIT/JIT.h
+++ b/lib/ExecutionEngine/JIT/JIT.h
@@ -1,10 +1,10 @@
//===-- JIT.h - Class definition for the JIT --------------------*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This file defines the top-level JIT data structure.
@@ -30,7 +30,7 @@ class MachineCodeEmitter;
class JIT : public ExecutionEngine {
TargetMachine &TM; // The current target we are compiling to
TargetJITInfo &TJI; // The JITInfo for the target we are compiling to
-
+
FunctionPassManager PM; // Passes to compile a function
MachineCodeEmitter *MCE; // MCE object
@@ -67,7 +67,7 @@ public:
// CompilationCallback - Invoked the first time that a call site is found,
// which causes lazy compilation of the target function.
- //
+ //
static void CompilationCallback();
/// getPointerToFunction - This returns the address of the specified function,
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 8b5071b31d..0905eb18e8 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -1,10 +1,10 @@
//===-- JITEmitter.cpp - Write machine code to executable memory ----------===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This file defines a MachineCodeEmitter object that is used by the JIT to
@@ -54,7 +54,7 @@ namespace {
public:
JITMemoryManager();
~JITMemoryManager();
-
+
inline unsigned char *allocateStub(unsigned StubSize);
inline unsigned char *allocateConstant(unsigned ConstantSize,
unsigned Alignment);
@@ -190,7 +190,7 @@ void *JITResolver::getFunctionStub(Function *F) {
void *Actual = (void*)LazyResolverFn;
if (F->isExternal() && F->hasExternalLinkage())
Actual = TheJIT->getPointerToFunction(F);
-
+
// Otherwise, codegen a new stub. For now, the stub will call the lazy
// resolver function.
Stub = TheJIT->getJITInfo().emitFunctionStub(Actual, MCE);
@@ -230,7 +230,7 @@ void *JITResolver::getExternalFunctionStub(void *FnAddr) {
/// it if necessary, then returns the resultant function pointer.
void *JITResolver::JITCompilerFn(void *Stub) {
JITResolver &JR = getJITResolver();
-
+
// The address given to us for the stub may not be exactly right, it might be
// a little bit after the stub. As such, use upper_bound to find it.
std::map<void*, Function*>::iterator I =
@@ -373,7 +373,7 @@ void JITEmitter::finishFunction(MachineFunction &F) {
void *ResultPtr;
if (MR.isString()) {
ResultPtr = TheJIT->getPointerToNamedFunction(MR.getString());
-
+
// If the target REALLY wants a stub for this function, emit it now.
if (!MR.doesntNeedFunctionStub())
ResultPtr = getJITResolver(this).getExternalFunctionStub(ResultPtr);
diff --git a/lib/ExecutionEngine/JIT/TargetSelect.cpp b/lib/ExecutionEngine/JIT/TargetSelect.cpp
index 7ef06a5220..851b4b4fb0 100644
--- a/lib/ExecutionEngine/JIT/TargetSelect.cpp
+++ b/lib/ExecutionEngine/JIT/TargetSelect.cpp
@@ -1,10 +1,10 @@
//===-- TargetSelect.cpp - Target Chooser Code ----------------------------===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This just asks the TargetMachineRegistry for the appropriate JIT to use, and
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp
index af15e0b1ad..5165bad199 100644
--- a/lib/Linker/LinkArchives.cpp
+++ b/lib/Linker/LinkArchives.cpp
@@ -1,10 +1,10 @@
//===- lib/Linker/LinkArchives.cpp - Link LLVM objects and libraries ------===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This file contains routines to handle linking together LLVM bytecode files,
@@ -26,7 +26,7 @@ using namespace llvm;
/// GetAllDefinedSymbols - Modifies its parameter DefinedSymbols to contain the
/// name of each externally-visible symbol defined in M.
///
-static void
+static void
GetAllDefinedSymbols(Module *M, std::set<std::string> &DefinedSymbols) {
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage())
@@ -60,7 +60,7 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
Function *Main = M->getMainFunction();
if (Main == 0 || Main->isExternal())
UndefinedSymbols.insert("main");
-
+
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
if (I->hasName()) {
if (I->isExternal())
@@ -76,7 +76,7 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
else if (!I->hasInternalLinkage())
DefinedSymbols.insert(I->getName());
}
-
+
// Prune out any defined symbols from the undefined symbols set...
for (std::set<std::string>::iterator I = UndefinedSymbols.begin();
I != UndefinedSymbols.end(); )
@@ -95,7 +95,7 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
/// Return Value:
/// TRUE - An error occurred.
/// FALSE - No errors.
-bool
+bool
Linker::LinkInArchive(const sys::Path &Filename) {
// Make sure this is an archive file we're dealing with
@@ -110,9 +110,9 @@ Linker::LinkInArchive(const sys::Path &Filename) {
// no reason to link in any archive files.
std::set<std::string> UndefinedSymbols;
GetAllUndefinedSymbols(Composite, UndefinedSymbols);
-
+
if (UndefinedSymbols.empty()) {
- verbose("No symbols undefined, skipping library '" +
+ verbose("No symbols undefined, skipping library '" +
Filename.toString() + "'");
return false; // No need to link anything in!
}
@@ -124,7 +124,7 @@ Linker::LinkInArchive(const sys::Path &Filename) {
Archive* arch = AutoArch.get();
if (!arch)
- return error("Cannot read archive '" + Filename.toString() +
+ return error("Cannot read archive '" + Filename.toString() +
"': " + ErrMsg);
// Save a set of symbols that are not defined by the archive. Since we're
@@ -133,13 +133,13 @@ Linker::LinkInArchive(const sys::Path &Filename) {
std::set<std::string> NotDefinedByArchive;
// While we are linking in object files, loop.
- while (true) {
+ while (true) {
// Find the modules we need to link into the target module
std::set<ModuleProvider*> Modules;
arch->findModulesDefiningSymbols(UndefinedSymbols, Modules);
- // If we didn't find any more modules to link this time, we are done
+ // If we didn't find any more modules to link this time, we are done
// searching this archive.
if (Modules.empty())
break;
@@ -162,7 +162,7 @@ Linker::LinkInArchive(const sys::Path &Filename) {
// Link it in
if (LinkInModule(aModule))
- return error("Cannot link in module '" +
+ return error("Cannot link in module '" +
aModule->getModuleIdentifier() + "': " + Error);
}
@@ -171,17 +171,17 @@ Linker::LinkInArchive(const sys::Path &Filename) {
GetAllUndefinedSymbols(Composite, UndefinedSymbols);
// At this point we have two sets of undefined symbols: UndefinedSymbols
- // which holds the undefined symbols from all the modules, and
+ // which holds the undefined symbols from all the modules, and
// NotDefinedByArchive which holds symbols we know the archive doesn't
// define. There's no point searching for symbols that we won't find in the
// archive so we subtract these sets.
set_subtract(UndefinedSymbols, NotDefinedByArchive);
-
+
// If there's no symbols left, no point in continuing to search the
// archive.
if (UndefinedSymbols.empty())
break;
}
-
+
return false;
}
diff --git a/lib/Linker/LinkItems.cpp b/lib/Linker/LinkItems.cpp
index b3fb5b00cf..34677ce365 100644
--- a/lib/Linker/LinkItems.cpp
+++ b/lib/Linker/LinkItems.cpp
@@ -1,10 +1,10 @@
//===- lib/Linker/LinkItems.cpp - Link LLVM objects and libraries ---------===//
-//
+//
// The LLVM Compiler Infrastructure
//
-// This file was developed by Reid Spencer and is distributed under the
+// This file was developed by Reid Spencer and is distributed under the
// University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This file contains routines to handle linking together LLVM bytecode files,
@@ -21,7 +21,7 @@ using namespace llvm;
bool
Linker::LinkInItems(const ItemList& Items) {
// For each linkage item ...
- for (ItemList::const_iterator I = Items.begin(), E = Items.end();
+ for (ItemList::const_iterator I = Items.begin(), E = Items.end();
I != E; ++I) {
if (I->second) {
// Link in the library suggested.
@@ -38,7 +38,7 @@ Linker::LinkInItems(const ItemList& Items) {
// that module should also be aggregated with duplicates eliminated. This is
// now the time to process the dependent libraries to resolve any remaining
// symbols.
- for (Module::lib_iterator I = Composite->lib_begin(),
+ for (Module::lib_iterator I = Composite->lib_begin(),
E = Composite->lib_end(); I != E; ++I)
if(LinkInLibrary(*I))
return true;
@@ -95,9 +95,9 @@ bool Linker::LinkInLibraries(const std::vector<std::string> &Libraries) {
// now the time to process the dependent libraries to resolve any remaining
// symbols.
const Module::LibraryListType& DepLibs = Composite->getLibraries();
- for (Module::LibraryListType::const_iterator I = DepLibs.begin(),
- E = DepLibs.end(); I != E; ++I)
- if (LinkInLibrary(*I))
+ for (Module::LibraryListType::const_iterator I = DepLibs.begin(),
+ E = DepLibs.end(); I != E; ++I)
+ if (LinkInLibrary(*I))
return true;
return false;
@@ -130,7 +130,7 @@ bool Linker::LinkInFile(const sys::Path &File) {
verbose("Linking bytecode file '" + File.toString() + "'");
std::auto_ptr<Module> M(LoadObject(File));
- if (M.get() == 0)
+ if (M.get() == 0)
return error("Cannot load file '" + File.toString() + "'" + Error);
if (LinkInModule(M.get()))
return error("Cannot link file '" + File.toString() + "'" + Error);
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 627a38cd0f..6daf061048 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -1,10 +1,10 @@
//===- lib/Linker/LinkModules.cpp - Module Linker Implementation ----------===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This file implements the LLVM module linker.
@@ -98,11 +98,11 @@ static bool RecursiveResolveTypesI(const PATypeHolder &DestTy,
const Type *SrcTyT = SrcTy.get();
const Type *DestTyT = DestTy.get();
if (DestTyT == SrcTyT) return false; // If already equal, noop
-
+
// If we found our opaque type, resolve it now!
if (isa<OpaqueType>(DestTyT) || isa<OpaqueType>(SrcTyT))
return ResolveTypes(DestTyT, SrcTyT, DestST, Name);
-
+
// Two types cannot be resolved together if they are of different primitive
// type. For example, we cannot resolve an int to a float.
if (DestTyT->getTypeID() != SrcTyT->getTypeID()) return true;
@@ -123,7 +123,7 @@ static bool RecursiveResolveTypesI(const PATypeHolder &DestTy,
return false;
}
case Type::StructTyID: {
- if (getST(DestTy)->getNumContainedTypes() !=
+ if (getST(DestTy)->getNumContainedTypes() !=
getST(SrcTy)->getNumContainedTypes()) return 1;
for (unsigned i = 0, e = getST(DestTy)->getNumContainedTypes(); i != e; ++i)
if (RecursiveResolveTypesI(getST(DestTy)->getContainedType(i),
@@ -159,7 +159,7 @@ static bool RecursiveResolveTypesI(const PATypeHolder &DestTy,
return Result;
}
default: assert(0 && "Unexpected type!"); return true;
- }
+ }
}
static bool RecursiveResolveTypes(const PATypeHolder &DestTy,
@@ -229,7 +229,7 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) {
if (!RecursiveResolveTypes(T2, T1, DestST, Name)) {
// We are making progress!
DelayedTypesToResolve.erase(DelayedTypesToResolve.begin()+i);
-
+
// Go back to the main loop, perhaps we can resolve directly by name
// now...
break;
@@ -407,7 +407,7 @@ static bool GetLinkageResult(GlobalValue *Dest, GlobalValue *Src,
} else {
assert(Dest->hasExternalLinkage() && Src->hasExternalLinkage() &&
"Unexpected linkage type!");
- return Error(Err, "Linking globals named '" + Src->getName() +
+ return Error(Err, "Linking globals named '" + Src->getName() +
"': symbol multiply defined!");
}
return false;
@@ -423,7 +423,7 @@ static bool LinkGlobals(Module *Dest, Module *Src,
// We will need a module level symbol table if the src module has a module
// level symbol table...
SymbolTable *ST = (SymbolTable*)&Dest->getSymbolTable();
-
+
// Loop over all of the globals in the src module, mapping them over as we go
for (Module::global_iterator I = Src->global_begin(), E = Src->global_end(); I != E; ++I) {
GlobalVariable *SGV = I;
@@ -541,11 +541,11 @@ static bool LinkGlobalInits(Module *Dest, const Module *Src,
Constant *SInit =
cast<Constant>(RemapOperand(SGV->getInitializer(), ValueMap));
- GlobalVariable *DGV = cast<GlobalVariable>(ValueMap[SGV]);
+ GlobalVariable *DGV = cast<GlobalVariable>(ValueMap[SGV]);
if (DGV->hasInitializer()) {
if (SGV->hasExternalLinkage()) {
if (DGV->getInitializer() != SInit)
- return Error(Err, "Global Variable Collision on '" +
+ return Error(Err, "Global Variable Collision on '" +
ToStr(SGV->getType(), Src) +"':%"+SGV->getName()+
" - Global variables have different initializers");
} else if (DGV->hasLinkOnceLinkage() || DGV->hasWeakLinkage()) {
@@ -577,7 +577,7 @@ static bool LinkFunctionProtos(Module *Dest, const Module *Src,
std::map<std::string, GlobalValue*> &GlobalsByName,
std::string *Err) {
SymbolTable *ST = (SymbolTable*)&Dest->getSymbolTable();
-
+
// Loop over all of the functions in the src module, mapping them over as we
// go
for (Module::const_iterator I = Src->begin(), E = Src->end(); I != E; ++I) {
@@ -637,8 +637,8 @@ static bool LinkFunctionProtos(Module *Dest, const Module *Src,
"' have different linkage specifiers!");
} else if (SF->hasExternalLinkage()) {
// The function is defined in both modules!!
- return Error(Err, "Function '" +
- ToStr(SF->getFunctionType(), Src) + "':\"" +
+ return Error(Err, "Function '" +
+ ToStr(SF->getFunctionType(), Src) + "':\"" +
SF->getName() + "\" - Function is already defined!");
} else {
assert(0 && "Unknown linkage configuration found!");
@@ -718,7 +718,7 @@ static bool LinkAppendingVars(Module *M,
std::multimap<std::string, GlobalVariable *> &AppendingVars,
std::string *ErrorMsg) {
if (AppendingVars.empty()) return false; // Nothing to do.
-
+
// Loop over the multimap of appending vars, processing any variables with the
// same name, forming a new appending global variable with both of the
// initializers merged together, then rewrite references to the old variables
@@ -735,7 +735,7 @@ static bool LinkAppendingVars(Module *M,
GlobalVariable *G1 = First->second, *G2 = Second->second;
const ArrayType *T1 = cast<ArrayType>(G1->getType()->getElementType());
const ArrayType *T2 = cast<ArrayType>(G2->getType()->getElementType());
-
+
// Check to see that they two arrays agree on type...
if (T1->getElementType() != T2->getElementType())
return Error(ErrorMsg,
@@ -803,7 +803,7 @@ static bool LinkAppendingVars(Module *M,
// error occurs, true is returned and ErrorMsg (if not null) is set to indicate
// the problem. Upon failure, the Dest module could be in a modified state, and
// shouldn't be relied on to be consistent.
-bool
+bool
Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) {
assert(Dest != 0 && "Invalid Destination module");
assert(Src != 0 && "Invalid Source Module");
@@ -824,7 +824,7 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) {
if (!Src->getTargetTriple().empty() &&
Dest->getTargetTriple() != Src->getTargetTriple())
std::cerr << "WARNING: Linking two modules of different target triples!\n";
-
+
// Update the destination module's dependent libraries list with the libraries
// from the source module. There's no opportunity for duplicates here as the
// Module ensures that duplicate insertions are discarded.
diff --git a/lib/Linker/Linker.cpp b/lib/Linker/Linker.cpp
index 19fd861c4d..e09c788593 100644
--- a/lib/Linker/Linker.cpp
+++ b/lib/Linker/Linker.cpp
@@ -1,10 +1,10 @@
//===- lib/Linker/Linker.cpp - Basic Linker functionality ----------------===//
-//
+//
// The LLVM Compiler Infrastructure
//
-// This file was developed by Reid Spencer and is distributed under the
+// This file was developed by Reid Spencer and is distributed under the
// U