summaryrefslogtreecommitdiff
path: root/src/mongo/base
diff options
context:
space:
mode:
authorADAM David Alan Martin <adam.martin@10gen.com>2019-08-15 04:10:04 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-08-15 04:10:04 -0400
commit7eff30764a9d2137fc761e218dc2a58b6c006539 (patch)
treefc7c12ef222fb11353e9ac48dc7e1873785ba97d /src/mongo/base
parenta810b1a727b2b4059c74bc9a17e04b0284ba9597 (diff)
downloadmongo-7eff30764a9d2137fc761e218dc2a58b6c006539.tar.gz
SERVER-41961 Remove the `NOINLINE_DECL` and replace with `MONGO_COMPILER_NOINLINE`
Also removed the `PACKED_DECL`, since it isn't used.
Diffstat (limited to 'src/mongo/base')
-rw-r--r--src/mongo/base/backtrace_visibility_test.cpp10
-rw-r--r--src/mongo/base/backtrace_visibility_test.h4
2 files changed, 6 insertions, 8 deletions
diff --git a/src/mongo/base/backtrace_visibility_test.cpp b/src/mongo/base/backtrace_visibility_test.cpp
index aa11d676141..1984829e93c 100644
--- a/src/mongo/base/backtrace_visibility_test.cpp
+++ b/src/mongo/base/backtrace_visibility_test.cpp
@@ -39,8 +39,8 @@
#include <sstream>
-// "static" means internal linkage only for functions in global namespace.
-NOINLINE_DECL static void static_function(std::string& s) {
+// "static" means internal linkage only for functions at namespace scope.
+MONGO_COMPILER_NOINLINE static void static_function(std::string& s) {
std::ostringstream ostream;
mongo::printStackTrace(ostream);
s = ostream.str();
@@ -49,14 +49,14 @@ NOINLINE_DECL static void static_function(std::string& s) {
}
namespace {
-NOINLINE_DECL void anonymous_namespace_function(std::string& s) {
+MONGO_COMPILER_NOINLINE void anonymous_namespace_function(std::string& s) {
static_function(s);
// Prevent tail-call optimization.
asm volatile(""); // NOLINT
}
} // namespace
-NOINLINE_DECL MONGO_COMPILER_API_HIDDEN_FUNCTION void hidden_function(std::string& s) {
+MONGO_COMPILER_NOINLINE MONGO_COMPILER_API_HIDDEN_FUNCTION void hidden_function(std::string& s) {
anonymous_namespace_function(s);
// Prevent tail-call optimization.
asm volatile(""); // NOLINT
@@ -65,7 +65,7 @@ NOINLINE_DECL MONGO_COMPILER_API_HIDDEN_FUNCTION void hidden_function(std::strin
namespace mongo {
namespace unwind_test_detail {
-NOINLINE_DECL void normal_function(std::string& s) {
+MONGO_COMPILER_NOINLINE void normal_function(std::string& s) {
hidden_function(s);
// Prevent tail-call optimization.
asm volatile(""); // NOLINT
diff --git a/src/mongo/base/backtrace_visibility_test.h b/src/mongo/base/backtrace_visibility_test.h
index 9d8e248fad8..cb60120af9c 100644
--- a/src/mongo/base/backtrace_visibility_test.h
+++ b/src/mongo/base/backtrace_visibility_test.h
@@ -32,8 +32,6 @@
* functions appear in backtraces, see unwind_test.cpp.
*/
-#include "mongo/bson/inline_decls.h"
-
#include <string>
namespace mongo {
@@ -41,7 +39,7 @@ namespace mongo {
namespace unwind_test_detail {
// Store a stack trace in s.
-NOINLINE_DECL void normal_function(std::string& s);
+void normal_function(std::string& s);
} // namespace unwind_test_detail