Chromium Code Reviews| Index: src/IceASanInstrumentation.h |
| diff --git a/src/IceASanInstrumentation.h b/src/IceASanInstrumentation.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..74f8ccf7357708665fc62c846350ab7d73a66310 |
| --- /dev/null |
| +++ b/src/IceASanInstrumentation.h |
| @@ -0,0 +1,45 @@ |
| +//===- subzero/src/IceASanInstrumentation.h - AddressSanitizer --*- C++ -*-===// |
| +// |
| +// The Subzero Code Generator |
| +// |
| +// This file is distributed under the University of Illinois Open Source |
| +// License. See LICENSE.TXT for details. |
| +// |
| +//===----------------------------------------------------------------------===// |
| +/// |
| +/// \file |
| +/// \brief Declares the AddressSanitizer instrumentation class. |
| +/// |
| +/// This class is responsible for inserting redzones around global and stack |
| +/// variables, inserting code responsible for poisoning those redzones, and |
| +/// performing any other instrumentation necessary to implement |
| +/// AddressSanitizer. |
| +/// |
| +//===----------------------------------------------------------------------===// |
| + |
| +#ifndef SUBZERO_SRC_ICEASANINSTRUMENTATION_H |
| +#define SUBZERO_SRC_ICEASANINSTRUMENTATION_H |
| + |
| + |
| +#include "IceInstrumentation.h" |
| + |
| +namespace Ice { |
| + |
| +class ASanInstrumentation : public Instrumentation { |
| + ASanInstrumentation() = delete; |
| + ASanInstrumentation(const ASanInstrumentation &) = delete; |
| + ASanInstrumentation &operator=(const ASanInstrumentation &) = delete; |
| + |
| +public: |
| + ASanInstrumentation(GlobalContext *Ctx) : Instrumentation(Ctx), |
| + didInsertRedZones(false) {} |
| + void instrumentGlobals(VariableDeclarationList &Globals) override; |
| + |
| +private: |
| + static constexpr uint32_t RzSize = 32; |
| + static const std::string RzPrefix; |
| + bool didInsertRedZones; |
|
Jim Stichnoth
2016/06/09 22:27:39
capitalize field name per LLVM convention
tlively
2016/06/09 23:30:10
Done.
|
| +}; |
| +} // end of namespace Ice |
| + |
| +#endif // SUBZERO_SRC_ICEASANINSTRUMENTATION_H |