//
// The LLVM Compiler Infrastructure
//
-// 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 is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
DumpAction(&cd->Linker);
}
-static bool GetBytecodeDependentLibraries(const std::string &fname,
- Module::LibraryListType& deplibs,
- std::string* ErrMsg) {
+static bool GetBitcodeDependentLibraries(const std::string &fname,
+ Module::LibraryListType& deplibs,
+ std::string* ErrMsg) {
ModuleProvider *MP = 0;
if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(fname)) {
MP = getBitcodeModuleProvider(Buffer);
if (programName[0] == '%' && programName.length() >2) {
switch(programName[1]){
case 'b':
- if (programName.substr(0,8) == "%bindir%") {
- std::string tmp(LLVM_BINDIR);
- tmp.append(programName.substr(8));
- pat->program.set(tmp);
- }
- break;
+ if (programName.substr(0,8) == "%bindir%") {
+ std::string tmp(LLVM_BINDIR);
+ tmp.append(programName.substr(8));
+ pat->program.set(tmp);
+ }
+ break;
case 'l':
- if (programName.substr(0,12) == "%llvmgccdir%"){
- std::string tmp(LLVMGCCDIR);
- tmp.append(programName.substr(12));
- pat->program.set(tmp);
- }else if (programName.substr(0,13) == "%llvmgccarch%"){
- std::string tmp(LLVMGCCARCH);
- tmp.append(programName.substr(13));
- pat->program.set(tmp);
- }else if (programName.substr(0,9) == "%llvmgcc%"){
- std::string tmp(LLVMGCC);
- tmp.append(programName.substr(9));
- pat->program.set(tmp);
- }else if (programName.substr(0,9) == "%llvmgxx%"){
- std::string tmp(LLVMGXX);
- tmp.append(programName.substr(9));
- pat->program.set(tmp);
- }else if (programName.substr(0,9) == "%llvmcc1%"){
- std::string tmp(LLVMCC1);
- tmp.append(programName.substr(9));
- pat->program.set(tmp);
- }else if (programName.substr(0,13) == "%llvmcc1plus%"){
- std::string tmp(LLVMCC1PLUS);
- tmp.append(programName.substr(13));
- pat->program.set(tmp);
- }else if (programName.substr(0,8) == "%libdir%") {
- std::string tmp(LLVM_LIBDIR);
- tmp.append(programName.substr(8));
- pat->program.set(tmp);
- }
- break;
+ if (programName.substr(0,12) == "%llvmgccdir%"){
+ std::string tmp(LLVMGCCDIR);
+ tmp.append(programName.substr(12));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,13) == "%llvmgccarch%"){
+ std::string tmp(LLVMGCCARCH);
+ tmp.append(programName.substr(13));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,9) == "%llvmgcc%"){
+ std::string tmp(LLVMGCC);
+ tmp.append(programName.substr(9));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,9) == "%llvmgxx%"){
+ std::string tmp(LLVMGXX);
+ tmp.append(programName.substr(9));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,9) == "%llvmcc1%"){
+ std::string tmp(LLVMCC1);
+ tmp.append(programName.substr(9));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,13) == "%llvmcc1plus%"){
+ std::string tmp(LLVMCC1PLUS);
+ tmp.append(programName.substr(13));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,8) == "%libdir%") {
+ std::string tmp(LLVM_LIBDIR);
+ tmp.append(programName.substr(8));
+ pat->program.set(tmp);
+ }
+ break;
}
}
action->program = pat->program;
}
/// This method processes a linkage item. The item could be a
- /// Bytecode file needing translation to native code and that is
- /// dependent on other bytecode libraries, or a native code
+ /// Bitcode file needing translation to native code and that is
+ /// dependent on other bitcode libraries, or a native code
/// library that should just be linked into the program.
bool ProcessLinkageItem(const llvm::sys::Path& link_item,
SetVector<sys::Path>& set,
// If we got here fullpath is the path to the file, and its readable.
set.insert(fullpath);
- // If its an LLVM bytecode file ...
- if (fullpath.isBytecodeFile()) {
+ // If its an LLVM bitcode file ...
+ if (fullpath.isBitcodeFile()) {
// Process the dependent libraries recursively
Module::LibraryListType modlibs;
- if (GetBytecodeDependentLibraries(fullpath.toString(),modlibs, &err)) {
+ if (GetBitcodeDependentLibraries(fullpath.toString(),modlibs, &err)) {
// Traverse the dependent libraries list
Module::lib_iterator LI = modlibs.begin();
Module::lib_iterator LE = modlibs.end();
// Get the suffix of the file name
const std::string& ftype = I->second;
- // If its a library, bytecode file, or object file, save
+ // If its a library, bitcode file, or object file, save
// it for linking below and short circuit the
// pre-processing/translation/assembly phases
if (ftype.empty() || ftype == "o" || ftype == "bc" || ftype=="a") {
// ll -> bc Helper
if (action.isSet(OUTPUT_IS_ASM_FLAG)) {
/// The output of the translator is an LLVM Assembly program
- /// We need to translate it to bytecode
+ /// We need to translate it to bitcode
Action* action = new Action();
action->program.set("llvm-as");
action->args.push_back(InFile.toString());
// ll -> bc Helper
if (action.isSet(OUTPUT_IS_ASM_FLAG)) {
/// The output of the optimizer is an LLVM Assembly program
- /// We need to translate it to bytecode with llvm-as
+ /// We need to translate it to bitcode with llvm-as
Action* action = new Action();
action->program.set("llvm-as");
action->args.push_back(InFile.toString());