misc: Use compiler.hh macros when available.
Some places were hand coding __attribute__s when macros in compiler.hh were available to do that job. Using the macros helps abstract away compiler specific details and should be used when possible. Change-Id: I94befebcfde2d673e874e9959588f69781bd9021 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35975 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/compiler.hh"
|
||||
#include "base/cprintf.hh"
|
||||
#include "base/logging.hh"
|
||||
#include "base/types.hh"
|
||||
@@ -245,7 +246,7 @@ registerNativeModules()
|
||||
* Make the commands array weak so that they can be overridden (used
|
||||
* by unit tests to specify a different python main function.
|
||||
*/
|
||||
const char * __attribute__((weak)) m5MainCommands[] = {
|
||||
M5_WEAK const char *m5MainCommands[] = {
|
||||
"import m5",
|
||||
"m5.main()",
|
||||
0 // sentinel is required
|
||||
|
||||
Reference in New Issue
Block a user