[llvm] r228756 - Oops. Don't call Windows functions on non-windows.
Zachary Turner
zturner at google.com
Tue Feb 10 14:47:14 PST 2015
Author: zturner
Date: Tue Feb 10 16:47:14 2015
New Revision: 228756
URL: http://llvm.org/viewvc/llvm-project?rev=228756&view=rev
Log:
Oops. Don't call Windows functions on non-windows.
Modified:
llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp
Modified: llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp?rev=228756&r1=228755&r2=228756&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp Tue Feb 10 16:47:14 2015
@@ -15,6 +15,7 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Config/config.h"
#include "llvm/DebugInfo/PDB/PDB.h"
#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
#include "llvm/DebugInfo/PDB/IPDBSession.h"
@@ -30,7 +31,9 @@
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
+#if defined(HAVE_DIA_SDK)
#include <Windows.h>
+#endif
using namespace llvm;
@@ -88,11 +91,16 @@ int main(int argc_, const char *argv_[])
cl::ParseCommandLineOptions(argv.size(), argv.data(), "LLVM PDB Dumper\n");
+#if defined(HAVE_DIA_SDK)
CoInitializeEx(nullptr, COINIT_MULTITHREADED);
+#endif
std::for_each(opts::InputFilenames.begin(), opts::InputFilenames.end(),
dumpInput);
+#if defined(HAVE_DIA_SDK)
CoUninitialize();
+#endif
+
return 0;
}
More information about the llvm-commits
mailing list