summaryrefslogtreecommitdiffstats
path: root/tools/llvm-size
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-04-14 13:54:10 +0000
committerdim <dim@FreeBSD.org>2012-04-14 13:54:10 +0000
commit1fc08f5e9ef733ef1ce6f363fecedc2260e78974 (patch)
tree19c69a04768629f2d440944b71cbe90adae0b615 /tools/llvm-size
parent07637c87f826cdf411f0673595e9bc92ebd793f2 (diff)
downloadFreeBSD-src-1fc08f5e9ef733ef1ce6f363fecedc2260e78974.zip
FreeBSD-src-1fc08f5e9ef733ef1ce6f363fecedc2260e78974.tar.gz
Vendor import of llvm trunk r154661:
http://llvm.org/svn/llvm-project/llvm/trunk@r154661
Diffstat (limited to 'tools/llvm-size')
-rw-r--r--tools/llvm-size/LLVMBuild.txt22
-rw-r--r--tools/llvm-size/Makefile6
-rw-r--r--tools/llvm-size/llvm-size.cpp10
3 files changed, 30 insertions, 8 deletions
diff --git a/tools/llvm-size/LLVMBuild.txt b/tools/llvm-size/LLVMBuild.txt
new file mode 100644
index 0000000..b4c538a
--- /dev/null
+++ b/tools/llvm-size/LLVMBuild.txt
@@ -0,0 +1,22 @@
+;===- ./tools/llvm-size/LLVMBuild.txt --------------------------*- Conf -*--===;
+;
+; The LLVM Compiler Infrastructure
+;
+; This file is distributed under the University of Illinois Open Source
+; License. See LICENSE.TXT for details.
+;
+;===------------------------------------------------------------------------===;
+;
+; This is an LLVMBuild description file for the components in this subdirectory.
+;
+; For more information on the LLVMBuild system, please see:
+;
+; http://llvm.org/docs/LLVMBuild.html
+;
+;===------------------------------------------------------------------------===;
+
+[component_0]
+type = Tool
+name = llvm-size
+parent = Tools
+required_libraries = Object
diff --git a/tools/llvm-size/Makefile b/tools/llvm-size/Makefile
index 5d0e27e..0622eb1 100644
--- a/tools/llvm-size/Makefile
+++ b/tools/llvm-size/Makefile
@@ -6,10 +6,10 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
-LEVEL = ../..
-TOOLNAME = llvm-size
-LINK_COMPONENTS = object
+LEVEL := ../..
+TOOLNAME := llvm-size
+LINK_COMPONENTS := object
# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
diff --git a/tools/llvm-size/llvm-size.cpp b/tools/llvm-size/llvm-size.cpp
index 70e5cb9..462da40 100644
--- a/tools/llvm-size/llvm-size.cpp
+++ b/tools/llvm-size/llvm-size.cpp
@@ -96,13 +96,13 @@ static void PrintObjectSectionSizes(ObjectFile *o) {
const char *radix_fmt = 0;
switch (Radix) {
case octal:
- radix_fmt = "llo";
+ radix_fmt = PRIo64;
break;
case decimal:
- radix_fmt = "llu";
+ radix_fmt = PRIu64;
break;
case hexadecimal:
- radix_fmt = "llx";
+ radix_fmt = PRIx64;
break;
}
if (OutputFormat == sysv) {
@@ -223,8 +223,8 @@ static void PrintObjectSectionSizes(ObjectFile *o) {
total_data,
total_bss);
fmtbuf.clear();
- fmt << "%7" << (Radix == octal ? "llo" : "llu") << " "
- << "%7llx ";
+ fmt << "%7" << (Radix == octal ? PRIo64 : PRIu64) << " "
+ << "%7" PRIx64 " ";
outs() << format(fmt.str().c_str(),
total,
total);
OpenPOWER on IntegriCloud