aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cfi
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cfi')
-rw-r--r--lib/cfi/cfi.cpp (renamed from lib/cfi/cfi.cc)15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/cfi/cfi.cc b/lib/cfi/cfi.cpp
index b0a943759678..fd48f71643b6 100644
--- a/lib/cfi/cfi.cc
+++ b/lib/cfi/cfi.cpp
@@ -1,9 +1,8 @@
-//===-------- cfi.cc ------------------------------------------------------===//
+//===-------- cfi.cpp -----------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -187,7 +186,7 @@ void ShadowBuilder::Install() {
GetShadowSize(), MAP_FIXED);
CHECK(res != MAP_FAILED);
#else
- void *res = MmapFixedOrDie(shadow_, GetShadowSize());
+ void *res = MmapFixedOrDie(shadow_, GetShadowSize(), "cfi shadow");
CHECK(res != MAP_FAILED);
::memcpy(&shadow_, &main_shadow, GetShadowSize());
#endif
@@ -373,7 +372,7 @@ void InitializeFlags() {
FlagParser cfi_parser;
RegisterCommonFlags(&cfi_parser);
- cfi_parser.ParseString(GetEnv("CFI_OPTIONS"));
+ cfi_parser.ParseStringFromEnv("CFI_OPTIONS");
#ifdef CFI_ENABLE_DIAG
FlagParser ubsan_parser;
@@ -382,7 +381,7 @@ void InitializeFlags() {
const char *ubsan_default_options = __ubsan::MaybeCallUbsanDefaultOptions();
ubsan_parser.ParseString(ubsan_default_options);
- ubsan_parser.ParseString(GetEnv("UBSAN_OPTIONS"));
+ ubsan_parser.ParseStringFromEnv("UBSAN_OPTIONS");
#endif
InitializeCommonFlags();