mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[llvm-cxxfilt] Use llvm::outs(). Simplify.
This adds a dependency on Support/. As llvm-cxxfilt will grow support for options this will be needed anyway. llvm-svn: 282523
This commit is contained in:
parent
139fefcb70
commit
5a9b476c7e
@ -1,5 +1,6 @@
|
||||
set(LLVM_LINK_COMPONENTS
|
||||
Demangle
|
||||
Support
|
||||
)
|
||||
|
||||
add_llvm_tool(llvm-cxxfilt
|
||||
|
@ -8,8 +8,8 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Demangle/Demangle.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace llvm;
|
||||
@ -19,10 +19,7 @@ int main(int argc, char **argv) {
|
||||
const char *Mangled = argv[I];
|
||||
int Status;
|
||||
char *Demangled = itaniumDemangle(Mangled, nullptr, nullptr, &Status);
|
||||
if (Demangled)
|
||||
printf("%s\n", Demangled);
|
||||
else
|
||||
printf("%s\n", Mangled);
|
||||
llvm::outs() << (Demangled ? Demangled : Mangled) << '\n';
|
||||
free(Demangled);
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user