[llvm-commits] [compiler-rt] r159128 - in /compiler-rt/trunk/lib: asan/asan_interceptors.h asan/asan_malloc_linux.cc asan/asan_stack.h interception/interception.h
Chandler Carruth
chandlerc at gmail.com
Sun Jun 24 23:53:11 PDT 2012
Author: chandlerc
Date: Mon Jun 25 01:53:10 2012
New Revision: 159128
URL: http://llvm.org/viewvc/llvm-project?rev=159128&view=rev
Log:
Lots of trivial changes to remove extraneous semicolons throughout ASan.
Modified:
compiler-rt/trunk/lib/asan/asan_interceptors.h
compiler-rt/trunk/lib/asan/asan_malloc_linux.cc
compiler-rt/trunk/lib/asan/asan_stack.h
compiler-rt/trunk/lib/interception/interception.h
Modified: compiler-rt/trunk/lib/asan/asan_interceptors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.h?rev=159128&r1=159127&r2=159128&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.h (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.h Mon Jun 25 01:53:10 2012
@@ -17,16 +17,16 @@
#include "asan_internal.h"
#include "interception/interception.h"
-DECLARE_REAL(int, memcmp, const void *a1, const void *a2, uptr size);
-DECLARE_REAL(void*, memcpy, void *to, const void *from, uptr size);
-DECLARE_REAL(void*, memset, void *block, int c, uptr size);
-DECLARE_REAL(char*, strchr, const char *str, int c);
-DECLARE_REAL(uptr, strlen, const char *s);
-DECLARE_REAL(char*, strncpy, char *to, const char *from, uptr size);
-DECLARE_REAL(uptr, strnlen, const char *s, uptr maxlen);
+DECLARE_REAL(int, memcmp, const void *a1, const void *a2, uptr size)
+DECLARE_REAL(void*, memcpy, void *to, const void *from, uptr size)
+DECLARE_REAL(void*, memset, void *block, int c, uptr size)
+DECLARE_REAL(char*, strchr, const char *str, int c)
+DECLARE_REAL(uptr, strlen, const char *s)
+DECLARE_REAL(char*, strncpy, char *to, const char *from, uptr size)
+DECLARE_REAL(uptr, strnlen, const char *s, uptr maxlen)
struct sigaction;
DECLARE_REAL(int, sigaction, int signum, const struct sigaction *act,
- struct sigaction *oldact);
+ struct sigaction *oldact)
namespace __asan {
Modified: compiler-rt/trunk/lib/asan/asan_malloc_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_malloc_linux.cc?rev=159128&r1=159127&r2=159128&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_malloc_linux.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_malloc_linux.cc Mon Jun 25 01:53:10 2012
@@ -103,7 +103,7 @@
return asan_malloc_usable_size(ptr, &stack);
}
-INTERCEPTOR(struct mallinfo, mallinfo) {
+INTERCEPTOR(struct mallinfo, mallinfo, void) {
struct mallinfo res;
REAL(memset)(&res, 0, sizeof(res));
return res;
Modified: compiler-rt/trunk/lib/asan/asan_stack.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_stack.h?rev=159128&r1=159127&r2=159128&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_stack.h (original)
+++ compiler-rt/trunk/lib/asan/asan_stack.h Mon Jun 25 01:53:10 2012
@@ -63,7 +63,7 @@
uptr bp = GET_CURRENT_FRAME(); \
uptr pc = GET_CALLER_PC(); \
uptr local_stack; \
- uptr sp = (uptr)&local_stack;
+ uptr sp = (uptr)&local_stack
// Use this macro if you want to print stack trace with the current
// function in the top frame.
@@ -71,7 +71,7 @@
uptr bp = GET_CURRENT_FRAME(); \
uptr pc = AsanStackTrace::GetCurrentPc(); \
uptr local_stack; \
- uptr sp = (uptr)&local_stack;
+ uptr sp = (uptr)&local_stack
// Get the stack trace with the given pc and bp.
// The pc will be in the position 0 of the resulting stack trace.
@@ -79,7 +79,7 @@
// fast_unwind is currently unused.
#define GET_STACK_TRACE_WITH_PC_AND_BP(max_s, pc, bp) \
AsanStackTrace stack; \
- stack.GetStackTrace(max_s, pc, bp); \
+ stack.GetStackTrace(max_s, pc, bp)
// NOTE: A Rule of thumb is to retrieve stack trace in the interceptors
// as early as possible (in functions exposed to the user), as we generally
@@ -87,7 +87,7 @@
#define GET_STACK_TRACE_HERE(max_size) \
GET_STACK_TRACE_WITH_PC_AND_BP(max_size, \
- AsanStackTrace::GetCurrentPc(), GET_CURRENT_FRAME()) \
+ AsanStackTrace::GetCurrentPc(), GET_CURRENT_FRAME())
#define GET_STACK_TRACE_HERE_FOR_MALLOC \
GET_STACK_TRACE_HERE(FLAG_malloc_context_size)
@@ -99,6 +99,6 @@
{ \
GET_STACK_TRACE_HERE(kStackTraceMax); \
stack.PrintStack(); \
- } \
+ }
#endif // ASAN_STACK_H
Modified: compiler-rt/trunk/lib/interception/interception.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/interception.h?rev=159128&r1=159127&r2=159128&view=diff
==============================================================================
--- compiler-rt/trunk/lib/interception/interception.h (original)
+++ compiler-rt/trunk/lib/interception/interception.h Mon Jun 25 01:53:10 2012
@@ -105,20 +105,20 @@
#define REAL(x) __interception::PTR_TO_REAL(x)
#define FUNC_TYPE(x) x##_f
-#define DECLARE_REAL(ret_type, func, ...); \
+#define DECLARE_REAL(ret_type, func, ...) \
typedef ret_type (*FUNC_TYPE(func))(__VA_ARGS__); \
namespace __interception { \
extern FUNC_TYPE(func) PTR_TO_REAL(func); \
}
-#define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...); \
+#define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...) \
DECLARE_REAL(ret_type, func, ##__VA_ARGS__); \
extern "C" ret_type WRAP(func)(__VA_ARGS__);
// FIXME(timurrrr): We might need to add DECLARE_REAL_EX etc to support
// different calling conventions later.
-#define DEFINE_REAL_EX(ret_type, convention, func, ...); \
+#define DEFINE_REAL_EX(ret_type, convention, func, ...) \
typedef ret_type (convention *FUNC_TYPE(func))(__VA_ARGS__); \
namespace __interception { \
FUNC_TYPE(func) PTR_TO_REAL(func); \
@@ -130,11 +130,11 @@
// foo with an interceptor for other function.
#define DEFAULT_CONVENTION
-#define DEFINE_REAL(ret_type, func, ...); \
+#define DEFINE_REAL(ret_type, func, ...) \
DEFINE_REAL_EX(ret_type, DEFAULT_CONVENTION, func, __VA_ARGS__);
#define INTERCEPTOR_EX(ret_type, convention, func, ...) \
- DEFINE_REAL_EX(ret_type, convention, func, __VA_ARGS__); \
+ DEFINE_REAL_EX(ret_type, convention, func, __VA_ARGS__) \
DECLARE_WRAPPER(ret_type, convention, func, __VA_ARGS__); \
extern "C" \
INTERCEPTOR_ATTRIBUTE \
More information about the llvm-commits
mailing list