[PATCH] D111544: [fir][NFC] Add two negative tests for needExternalNameMangling
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 11 06:53:37 PDT 2021
clementval created this revision.
clementval added reviewers: jeanPerier, svedanayagam, sscalpone, kiranchandramohan, jdoerfert, schweitz, pmccormick, mehdi_amini, rovka, AlexisPerry.
Herald added a project: Flang.
clementval requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Add two test for needExternalNameMangling.
- One varibale in a function
- One namelist in a module
This patch is part of the upstreaming effort from fir-dev branch.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D111544
Files:
flang/unittests/Optimizer/InternalNamesTest.cpp
Index: flang/unittests/Optimizer/InternalNamesTest.cpp
===================================================================
--- flang/unittests/Optimizer/InternalNamesTest.cpp
+++ flang/unittests/Optimizer/InternalNamesTest.cpp
@@ -30,10 +30,10 @@
}
private:
- llvm::SmallVector<std::string, 2> modules;
+ llvm::SmallVector<std::string> modules;
llvm::Optional<std::string> host;
std::string name;
- llvm::SmallVector<std::int64_t, 4> kinds;
+ llvm::SmallVector<std::int64_t> kinds;
};
void validateDeconstructedName(
@@ -228,6 +228,8 @@
ASSERT_FALSE(NameUniquer::needExternalNameMangling(""));
ASSERT_FALSE(NameUniquer::needExternalNameMangling("_QDTmytypeK2K8K18"));
ASSERT_FALSE(NameUniquer::needExternalNameMangling("exit_"));
+ ASSERT_FALSE(NameUniquer::needExternalNameMangling("_QFfooEx"));
+ ASSERT_FALSE(NameUniquer::needExternalNameMangling("_QFmstartGmpitop"));
ASSERT_TRUE(NameUniquer::needExternalNameMangling("_QPfoo"));
ASSERT_TRUE(NameUniquer::needExternalNameMangling("_QPbar"));
ASSERT_TRUE(NameUniquer::needExternalNameMangling("_QBa"));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111544.378648.patch
Type: text/x-patch
Size: 1096 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211011/66624719/attachment.bin>
More information about the llvm-commits
mailing list