Mercurial > hg > truffle
comparison src/share/vm/compiler/compileLog.hpp @ 17937:78bbf4d43a14
8037816: Fix for 8036122 breaks build with Xcode5/clang
8043029: Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
8043164: Format warning in traceStream.hpp
Summary: Backport of main fix + two corrections, enables clang compilation, turns on format attributes, corrects/mutes warnings
Reviewed-by: kvn, coleenp, iveresov, twisti
author | drchase |
---|---|
date | Thu, 22 May 2014 15:52:41 -0400 |
parents | 55fb97c4c58d |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
52 | 52 |
53 CompileLog* _next; // static chain of all logs | 53 CompileLog* _next; // static chain of all logs |
54 | 54 |
55 static CompileLog* _first; // head of static chain | 55 static CompileLog* _first; // head of static chain |
56 | 56 |
57 void va_tag(bool push, const char* format, va_list ap); | 57 void va_tag(bool push, const char* format, va_list ap) ATTRIBUTE_PRINTF(3, 0); |
58 | 58 |
59 public: | 59 public: |
60 CompileLog(const char* file_name, FILE* fp, intx thread_id); | 60 CompileLog(const char* file_name, FILE* fp, intx thread_id); |
61 ~CompileLog(); | 61 ~CompileLog(); |
62 | 62 |
66 // Optional context marker, to help place actions that occur during | 66 // Optional context marker, to help place actions that occur during |
67 // parsing. If there is no log output until the next context string | 67 // parsing. If there is no log output until the next context string |
68 // or reset, context string will be silently ignored | 68 // or reset, context string will be silently ignored |
69 stringStream* context() { return &_context; } | 69 stringStream* context() { return &_context; } |
70 void clear_context() { context()->reset(); } | 70 void clear_context() { context()->reset(); } |
71 void set_context(const char* format, ...); | 71 void set_context(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); |
72 | 72 |
73 void name(ciSymbol* s); // name='s' | 73 void name(ciSymbol* s); // name='s' |
74 void name(Symbol* s) { xmlStream::name(s); } | 74 void name(Symbol* s) { xmlStream::name(s); } |
75 | 75 |
76 // Output an object description, return obj->ident(). | 76 // Output an object description, return obj->ident(). |