diff options
author | Philip Pfaffe <philip.pfaffe@gmail.com> | 2018-05-02 14:55:39 +0000 |
---|---|---|
committer | Philip Pfaffe <philip.pfaffe@gmail.com> | 2018-05-02 14:55:39 +0000 |
commit | e9ca17e9b6419c6980a232537fa0fed419c884c7 (patch) | |
tree | e70e416892aecad93bb62331d283c70cac5a8a56 /polly/include | |
parent | d2ff5fb5365658d54e72f33397aee1d44101b57c (diff) | |
download | bcm5719-llvm-e9ca17e9b6419c6980a232537fa0fed419c884c7.tar.gz bcm5719-llvm-e9ca17e9b6419c6980a232537fa0fed419c884c7.zip |
Revert "[polly] [ScopInfo] Don't pre-compute the name of the Scop's region."
This reverts commit 0f9dc03765dc301fff7a52e2a0e1dd3e5f3130c5, r328666.
The change introduced a use-after-free, caused by the temporary name string
being destroyed after converting it to a StringRef.
llvm-svn: 331363
Diffstat (limited to 'polly/include')
-rw-r--r-- | polly/include/polly/ScopInfo.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index 09bdefa208e..324cc2748e4 100644 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -1716,6 +1716,9 @@ private: /// The underlying Region. Region &R; + /// The name of the SCoP (identical to the regions name) + std::string name; + /// The ID to be assigned to the next Scop in a function static int NextScopID; @@ -2452,7 +2455,7 @@ public: /// could be executed. bool isEmpty() const { return Stmts.empty(); } - const StringRef getName() const { return R.getNameStr(); } + const StringRef getName() const { return name; } using array_iterator = ArrayInfoSetTy::iterator; using const_array_iterator = ArrayInfoSetTy::const_iterator; |