From 26e9c99010b6870ee5c8ce998a84214e06f3f3a9 Mon Sep 17 00:00:00 2001 From: Amy Huang Date: Mon, 1 Feb 2021 17:33:46 -0800 Subject: [PATCH] [Docs] Add some documentation for constructor homing, a debug info optimization (-fuse-ctor-homing) Adding this, since there's currently no documentation about this. Differential Revision: https://reviews.llvm.org/D95911 --- clang/docs/UsersManual.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index b9024a3..a2fc8c0 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -2504,6 +2504,18 @@ below. If multiple flags are present, the last one is used. **-fno-standalone-debug** option can be used to get to turn on the vtable-based optimization described above. +.. option:: -fuse-ctor-homing + + This optimization is similar to the optimizations that are enabled as part + of -fno-standalone-debug. Here, Clang only emits type info for a + non-trivial, non-aggregate C++ class in the modules that contain a + definition of one of its constructors. This relies on the additional + assumption that all classes that are not trivially constructible have a + non-trivial constructor that is used somewhere. + + This flag is not enabled by default, and needs to be used with -cc1 or + -Xclang. + .. option:: -g Generate complete debug info. -- 2.7.4