Update ROCm for multi-target support
[deliverable/binutils-gdb.git] / gdb / source-cache.c
index 7a52ce9458e538153412e89d576a2af4b43afa41..965dc380b14c4100b0cc69220d738c1a0ba8a13c 100644 (file)
@@ -1,5 +1,5 @@
 /* Cache of styled source file text
-   Copyright (C) 2018-2019 Free Software Foundation, Inc.
+   Copyright (C) 2018-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -190,14 +190,14 @@ source_cache::ensure (struct symtab *s)
             conditional compilation in source-cache.h.  */
          static srchilite::SourceHighlight *highlighter;
 
-         if (highlighter == nullptr)
-           {
-             highlighter = new srchilite::SourceHighlight ("esc.outlang");
-             highlighter->setStyleFile ("esc.style");
-           }
-
          try
            {
+             if (highlighter == nullptr)
+               {
+                 highlighter = new srchilite::SourceHighlight ("esc.outlang");
+                 highlighter->setStyleFile ("esc.style");
+               }
+
              std::istringstream input (contents);
              std::ostringstream output;
              highlighter->highlight (input, output, lang_name, fullname);
This page took 0.02584 seconds and 4 git commands to generate.