1
0
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:
Davide Italiano 2016-09-27 18:50:30 +00:00
parent 139fefcb70
commit 5a9b476c7e
2 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,6 @@
set(LLVM_LINK_COMPONENTS
Demangle
Support
)
add_llvm_tool(llvm-cxxfilt

View File

@ -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;