gallivm: Avoid llvm::sys::getProcessTriple().
authorJose Fonseca <jfonseca@vmware.com>
Fri, 15 Apr 2016 11:05:09 +0000 (12:05 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Tue, 19 Apr 2016 10:31:37 +0000 (11:31 +0100)
Just use LLVM_HOST_TRIPLE, which is available at least from LLVM 3.3
onwards, and is pretty much what llvm::sys::getProcessTriple() does anyway,

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp

index a299c8a86ddfea2698c2b40bf1ffdd015c116a5a..f311fe7f690625d65f20280fe095265dfd4799d2 100644 (file)
@@ -109,13 +109,13 @@ disassemble(const void* func, std::ostream &buffer)
     * Initialize all used objects.
     */
 
-   std::string Triple = llvm::sys::getProcessTriple();
-   LLVMDisasmContextRef D = LLVMCreateDisasm(Triple.c_str(), NULL, 0, NULL, NULL);
+   const char *triple = LLVM_HOST_TRIPLE;
+   LLVMDisasmContextRef D = LLVMCreateDisasm(triple, NULL, 0, NULL, NULL);
    char outline[1024];
 
    if (!D) {
       buffer << "error: could not create disassembler for triple "
-             << Triple.c_str() << '\n';
+             << triple << '\n';
       return 0;
    }