]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/DebugLib.h
MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for CLANG
[mirror_edk2.git] / MdePkg / Include / Library / DebugLib.h
index f1d55cf62b0e111bfbcace5a2aba8b48ffe90fed..baab34bf0528c380d879107be89aaaedd1a2773e 100644 (file)
@@ -8,7 +8,7 @@
   of size reduction when compiler optimization is disabled. If MDEPKG_NDEBUG is\r
   defined, then debug and assert related macros wrapped by it are the NULL implementations.\r
 \r
-Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -289,7 +289,11 @@ DebugPrintLevelEnabled (
   @param  Expression  Boolean expression that evaluated to FALSE\r
 \r
 **/\r
+#if defined(__clang__) && defined(__FILE_NAME__)\r
+#define _ASSERT(Expression)  DebugAssert (__FILE_NAME__, __LINE__, #Expression)\r
+#else\r
 #define _ASSERT(Expression)  DebugAssert (__FILE__, __LINE__, #Expression)\r
+#endif\r
 \r
 \r
 /**\r