diff options
| author | Zachary Turner <zturner@google.com> | 2015-02-10 22:47:14 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2015-02-10 22:47:14 +0000 |
| commit | 8d7fa9b37b0e368545054f2dab5bca9515b1ff8e (patch) | |
| tree | 23ea125b6ba904d782f8dd3d32a5407a2ab5fc47 | |
| parent | a5549178f12d3d4dad72e1ab8efbb6fc9ed0d2c9 (diff) | |
| download | bcm5719-llvm-8d7fa9b37b0e368545054f2dab5bca9515b1ff8e.tar.gz bcm5719-llvm-8d7fa9b37b0e368545054f2dab5bca9515b1ff8e.zip | |
Oops. Don't call Windows functions on non-windows.
llvm-svn: 228756
| -rw-r--r-- | llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp index e2db7f6daf9..6044fda1635 100644 --- a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp +++ b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp @@ -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; } |

