Lines Matching refs:llvm

44 llvm::cl::list<std::string>
45 OptInputFilenames(llvm::cl::Positional, llvm::cl::OneOrMore,
46 llvm::cl::desc("<input bitcode files>"));
48 llvm::cl::opt<std::string>
49 OptOutputFilename("o", llvm::cl::desc("Specify the output filename"),
50 llvm::cl::value_desc("filename"));
52 llvm::cl::opt<std::string>
53 OptRuntimePath("rt-path", llvm::cl::desc("Specify the runtime library path"),
54 llvm::cl::value_desc("path"));
56 llvm::cl::opt<std::string>
58 llvm::cl::desc("Specify the target triple (default: "
60 llvm::cl::init(DEFAULT_TARGET_TRIPLE_STRING),
61 llvm::cl::value_desc("triple"));
63 llvm::cl::alias OptTargetTripleC("C", llvm::cl::NotHidden,
64 llvm::cl::desc("Alias for -mtriple"),
65 llvm::cl::aliasopt(OptTargetTriple));
70 llvm::cl::opt<bool>
71 OptPIC("fPIC", llvm::cl::desc("Generate fully relocatable, position independent"
74 llvm::cl::opt<char>
75 OptOptLevel("O", llvm::cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] "
77 llvm::cl::Prefix, llvm::cl::ZeroOrMore, llvm::cl::init('2'));
79 llvm::cl::opt<bool>
80 OptC("c", llvm::cl::desc("Compile and assemble, but do not link."));
88 llvm::cl::opt<std::string>
89 OptImmObjectOutput("or", llvm::cl::desc("Specify the filename for output the "
92 "library"), llvm::cl::ValueRequired);
94 llvm::cl::opt<bool>
95 OptShared("shared", llvm::cl::desc("Create a shared library from input bitcode "
102 llvm::raw_ostream &os = llvm::outs(); in BCCVersionPrinter()
113 const llvm::cl::list<std::string> &pBitcodeFiles) { in PrepareScript()
120 llvm::errs() << "Failed to load llvm module from file `" << input_bitcode in PrepareScript()
127 llvm::errs() << "Failed to merge the llvm module `" << input_bitcode in PrepareScript()
135 llvm::errs() << "Out of memory when create script for file `" in PrepareScript()
153 llvm::errs() << "Out of memory when create the compiler configuration!\n"; in ConfigCompiler()
182 config->setRelocationModel(llvm::Reloc::PIC_); in ConfigCompiler()
186 config->setCodeModel(llvm::CodeModel::Small); in ConfigCompiler()
190 case '0': config->setOptimizationLevel(llvm::CodeGenOpt::None); break; in ConfigCompiler()
191 case '1': config->setOptimizationLevel(llvm::CodeGenOpt::Less); break; in ConfigCompiler()
192 case '3': config->setOptimizationLevel(llvm::CodeGenOpt::Aggressive); break; in ConfigCompiler()
195 config->setOptimizationLevel(llvm::CodeGenOpt::Default); in ConfigCompiler()
204 llvm::errs() << "Failed to configure the compiler! (detail: " in ConfigCompiler()
221 llvm::errs() << "Use " DEFAULT_OUTPUT_PATH " for output file!\n"; in DetermineOutputFilename()
227 llvm::SmallString<200> output_path(input_path); in DetermineOutputFilename()
229 std::error_code err = llvm::sys::fs::make_absolute(output_path); in DetermineOutputFilename()
231 llvm::errs() << "Failed to determine the absolute path of `" << input_path in DetermineOutputFilename()
238 llvm::sys::path::replace_extension(output_path, "o"); in DetermineOutputFilename()
242 llvm::sys::path::remove_filename(output_path); in DetermineOutputFilename()
243 llvm::sys::path::append(output_path, "a.out"); in DetermineOutputFilename()
250 llvm::cl::SetVersionPrinter(BCCVersionPrinter); in main()
251 llvm::cl::ParseCommandLineOptions(argc, argv); in main()