[lld] r246032 - COFF: Print out module-definition files if /verbose is given.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 05:37:54 PDT 2015
Author: ruiu
Date: Wed Aug 26 07:37:54 2015
New Revision: 246032
URL: http://llvm.org/viewvc/llvm-project?rev=246032&view=rev
Log:
COFF: Print out module-definition files if /verbose is given.
This is useful for testing.
Modified:
lld/trunk/COFF/DriverUtils.cpp
Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=246032&r1=246031&r2=246032&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Wed Aug 26 07:37:54 2015
@@ -483,18 +483,18 @@ static std::string writeToTempFile(Strin
static std::string createModuleDefinitionFile() {
std::string S;
llvm::raw_string_ostream OS(S);
- OS << "LIBRARY \"" << llvm::sys::path::filename(Config->OutputFile) << "\"\n"
- << "EXPORTS\n";
+ OS << " LIBRARY \"" << llvm::sys::path::filename(Config->OutputFile) << "\"\n"
+ << " EXPORTS\n";
for (Export &E : Config->Exports) {
- OS << " " << E.ExtLibName;
+ OS << " " << E.ExtLibName;
if (E.Ordinal > 0)
- OS << " @" << E.Ordinal;
+ OS << " @" << E.Ordinal;
if (E.Noname)
- OS << " NONAME";
+ OS << " NONAME";
if (E.Data)
- OS << " DATA";
+ OS << " DATA";
if (E.Private)
- OS << " PRIVATE";
+ OS << " PRIVATE";
OS << "\n";
}
OS.flush();
@@ -507,6 +507,9 @@ void writeImportLibrary() {
std::string Def = writeToTempFile(Contents);
llvm::FileRemover TempFile(Def);
+ if (Config->Verbose)
+ llvm::outs() << "Module-definition file:" << Contents;
+
Executor E("lib.exe");
E.add("/nologo");
E.add("/machine:" + machineToStr(Config->Machine));
More information about the llvm-commits
mailing list