summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-c-test/echo.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-05 20:45:04 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-05 20:45:04 +0000
commit91d3cfed785b46723ebbf8197f70aa0f854c05d7 (patch)
tree94f71306bb51cc3e1cadab7d71e0de2d51328b89 /llvm/tools/llvm-c-test/echo.cpp
parent27e95f7c7b22117e5f36d1ef874dac9b48555f18 (diff)
downloadbcm5719-llvm-91d3cfed785b46723ebbf8197f70aa0f854c05d7.tar.gz
bcm5719-llvm-91d3cfed785b46723ebbf8197f70aa0f854c05d7.zip
Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes."
This reverts commit r265454 since it broke the build. E.g.: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/22413/ llvm-svn: 265459
Diffstat (limited to 'llvm/tools/llvm-c-test/echo.cpp')
-rw-r--r--llvm/tools/llvm-c-test/echo.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/llvm/tools/llvm-c-test/echo.cpp b/llvm/tools/llvm-c-test/echo.cpp
index b0e47d8f544..1922b429eb2 100644
--- a/llvm/tools/llvm-c-test/echo.cpp
+++ b/llvm/tools/llvm-c-test/echo.cpp
@@ -16,18 +16,12 @@
//===----------------------------------------------------------------------===//
#include "llvm-c-test.h"
-#include "llvm-c/Core.h"
-#include "llvm-c/ErrorHandling.h"
#include "llvm-c/Target.h"
-#include "llvm-c/Types.h"
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/Hashing.h"
-#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/ErrorHandling.h"
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
+#include <stdio.h>
+#include <stdlib.h>
using namespace llvm;
@@ -45,16 +39,13 @@ struct CAPIDenseMap<T*> {
uintptr_t Val = static_cast<uintptr_t>(-1);
return reinterpret_cast<T*>(Val);
}
-
static inline T* getTombstoneKey() {
uintptr_t Val = static_cast<uintptr_t>(-2);
return reinterpret_cast<T*>(Val);
}
-
static unsigned getHashValue(const T *PtrVal) {
return hash_value(PtrVal);
}
-
static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
};
@@ -163,9 +154,7 @@ struct TypeCloner {
}
};
-namespace {
-
-ValueMap clone_params(LLVMValueRef Src, LLVMValueRef Dst) {
+static ValueMap clone_params(LLVMValueRef Src, LLVMValueRef Dst) {
unsigned Count = LLVMCountParams(Src);
if (Count != LLVMCountParams(Dst))
report_fatal_error("Parameter count mismatch");
@@ -223,8 +212,6 @@ ValueMap clone_params(LLVMValueRef Src, LLVMValueRef Dst) {
return VMap;
}
-} // end anonymous namespace
-
LLVMValueRef clone_constant(LLVMValueRef Cst, LLVMModuleRef M) {
if (!LLVMIsAConstant(Cst))
report_fatal_error("Expected a constant");
@@ -723,9 +710,7 @@ struct FunCloner {
}
};
-namespace {
-
-void declare_symbols(LLVMModuleRef Src, LLVMModuleRef M) {
+static void declare_symbols(LLVMModuleRef Src, LLVMModuleRef M) {
LLVMValueRef Begin = LLVMGetFirstGlobal(Src);
LLVMValueRef End = LLVMGetLastGlobal(Src);
@@ -789,7 +774,7 @@ FunDecl:
}
}
-void clone_symbols(LLVMModuleRef Src, LLVMModuleRef M) {
+static void clone_symbols(LLVMModuleRef Src, LLVMModuleRef M) {
LLVMValueRef Begin = LLVMGetFirstGlobal(Src);
LLVMValueRef End = LLVMGetLastGlobal(Src);
@@ -876,8 +861,6 @@ FunClone:
}
}
-} // end anonymous namespace
-
int llvm_echo(void) {
LLVMEnablePrettyStackTrace();
OpenPOWER on IntegriCloud