From 91d3cfed785b46723ebbf8197f70aa0f854c05d7 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 5 Apr 2016 20:45:04 +0000 Subject: 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 --- llvm/tools/llvm-c-test/echo.cpp | 27 +++++---------------------- llvm/tools/llvm-c-test/llvm-c-test.h | 9 ++------- 2 files changed, 7 insertions(+), 29 deletions(-) (limited to 'llvm/tools/llvm-c-test') 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 -#include -#include +#include +#include using namespace llvm; @@ -45,16 +39,13 @@ struct CAPIDenseMap { uintptr_t Val = static_cast(-1); return reinterpret_cast(Val); } - static inline T* getTombstoneKey() { uintptr_t Val = static_cast(-2); return reinterpret_cast(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(); diff --git a/llvm/tools/llvm-c-test/llvm-c-test.h b/llvm/tools/llvm-c-test/llvm-c-test.h index fa5a9d04cca..60edc0df4d1 100644 --- a/llvm/tools/llvm-c-test/llvm-c-test.h +++ b/llvm/tools/llvm-c-test/llvm-c-test.h @@ -10,15 +10,10 @@ |* Header file for llvm-c-test *| |* *| \*===----------------------------------------------------------------------===*/ - #ifndef LLVM_C_TEST_H #define LLVM_C_TEST_H -#ifdef __cplusplus -#include -#else #include -#endif #include "llvm-c/Core.h" #ifdef __cplusplus @@ -56,6 +51,6 @@ int llvm_echo(void); #ifdef __cplusplus } -#endif +#endif /* !defined(__cplusplus) */ -#endif // LLVM_C_TEST_H +#endif -- cgit v1.2.3